[TxMt] BUG: HTML/PHP bundle embedded source scope fails to close

Ashley Thomas Ashley.A.Thomas at Dartmouth.EDU
Tue Feb 20 15:57:45 UTC 2007


In a PHP file, embedded code followed by punctuation or digit fails  
to close scope.

For example:

<h1><?php echo $title ?><h1>

Control-Shift-P just before ?>< produces:

text.html.basic
source.php.embedded.line.html

Control-Shift-P between ? and >< or between ?> and < produces:

text.html.basic
source.php.embedded.line.html
keyword.operator.comparison.php

...and scope continues to be 'source.php.embedded.line.html' until it  
hits a ?> not followed by punctuation/digit somewhere in the file.

If I put whitespace or A-Za-z after the ?> (which I can't do in some  
cases, like in a filepath), the source scope closes, but its still  
says 'keyword.operator.comparison.php'. Same thing happens in a multi- 
line embed immediately followed by punctuation.

The HTML language bundle has a comment about "match only multi-line  
PHP with leading whitespace", but even when I make the embedded php  
multi-line with leading whitespace, it still fails to close without  
trailing whitespace, et al.

Very annoying for me since I use different syntax highlighting for  
source and text in the same document. Tried googling mailing list  
archives, couldn't find another mention of this.

Ashley



More information about the textmate mailing list