Follow up for #1921818: Modify drupal_rewrite_settings() to allow writing $settings values
Problem/Motivation
The current implementation of drupal_rewrite_settings() does not allow sticking settings to their comment blocks as proposed in the original issue description.
However, the comment blocks in settings.php are helpful and we want the settings to stick to those blocks.
Proposed resolution
Add more states to drupal_rewrite_settings() when stepping through each token in settings.php trying to replace any variables that are in the passed-in array.
Remaining tasks
Reviews needed.
User interface changes
None.
API changes
None.
Original report by heyrocker
#1921818: Modify drupal_rewrite_settings() to allow writing $settings values