Sublime Forum

Syntax highlighting for nested html?

#1

Hello Forum,

sorry if this has been answered elsewhere, I didn’t find appropriate answer and maybe my English isn’t good enough to cover all relevant search terms …

However, I’m coding in PHP with nested HTML as string. For example:

<?php
foreach($page->children("limit=10") as $child) {
echo "<div class='project teaser'>";
echo "<p class='meta'><a href='{$child->url}'>{$child->project_commission}&nbsp;{$child->title}</a></p>
<p class='summary'>{$child->summary}&nbsp;<a href='{$child->url}' title='{$child->title}'>&nbsp;+&nbsp;Mehr erfahren</a></p>"; 
echo "</div>";
}
?>

With this coding style I’m losing syntax highlighting for the html pieces. Is there a way to maintain it? I have the Soda-Theme installed together with Monokai for Soda.

Thanks for your help

0 Likes

Syntax Highlighting for nested objects (html specifically)
#2

I ran into this problem as well, basically the explanation I received was the limitation of the textmate color-schemas. I still haven’t been told whether a sublime-theme file would fix this though.

0 Likes