Reproduction:
- In Gedit, open a new file and manually select the syntax highlighting language (at the bottom right) to
PHP. - Write some javascript in
<script>tags - Within the
<script>tags, echo some XHTML with self-closing tags - Note that all of the code that follows is no longer syntax highlighted
Alternatively, paste this in:
<?php
echo 'hello - this is still syntax highlighted! <span id="foo"></span>';
?>
<script>
myApp: {
foobar: function() {
document.id('foo').set('html', '<hr />');
alert('uh-oh, what happened to the syntax highlighting? This string is no longer coloured.');
}
}
</script>
<?php
echo 'syntax highlighting returns after the closing </script> tag';
?>
It's not a big deal, since I can work around it right now by replacing all self-closing tags with their HTML 4 equivalents (e.g. <input></input>), but I was wondering if anybody else dealt with this problem...