Originally posted on the Atom discussion boards here.
Some PHP elements embedded into HTML strings are not formatted as PHP, rather they get the default HTML string formatting. I used the following code to address the issue in styles.less, but it's certainly possible that this could affect other code that I haven't encountered yet. If someone wants to use this as a starting point and submit a pull request, have at it!
// Fixes php inside of strings
.syntax--string .syntax--source,
.syntax--string .syntax--meta.syntax--embedded.syntax--line {
color: hsl( 220, 14%, 71% );
}
// The above fix affects punctuation in the closing php tag,
// so use this to reset the color accordingly.
.syntax--string .syntax--punctuation.syntax--section.syntax--embedded .syntax--source {
color: hsl( 5, 48%, 51% );
}
Originally posted on the Atom discussion boards here.
Some PHP elements embedded into HTML strings are not formatted as PHP, rather they get the default HTML string formatting. I used the following code to address the issue in styles.less, but it's certainly possible that this could affect other code that I haven't encountered yet. If someone wants to use this as a starting point and submit a pull request, have at it!