[SVN] HTML highlighting in PHP strings

Allan Odgaard allan at macromates.com
Mon May 2 10:37:00 UTC 2005


On May 2, 2005, at 1:54, Max Williams wrote:

> The thing is, that out of interest I typed <? into my string to see 
> what would happen, and rather unsurprisingly Textmate crashed with:
>
> *** graph path stack full: 28+4 (6, 8)
> bits used: 28
>
> in my console, I guess it got in some sort of loop.

Well, technically it shouldn't pose a problem, but beta 6/7 uses a 
fixed size stack (31 bits) to represent the scope (path), so by nesting 
too much, you'll blow the stack (and I think TM will just abort() when 
that happens, writing the error you quoted above). I did plan to follow 
beta 6 with a beta 7 a few days later that used a dynamic stack (when 
required), but who knew code didn't write itself? ;)

> However, the highlighting was quite helpful until it exploded, and I 
> wondered what others might think about trying to introduce this kind 
> of thing on a less precarious way.

Sounds like a neat idea -- when I fix the stack, then let us try to put 
it in the default files!

> Another idea I had would be to include source.css property-list into 
> the value part of the html 'style' attribute, to make that colourized.
>
> Maybe these are rather gimmicky proposals, but Textmate seems to have 
> the potential to do this kind of thing, and I think it would be 
> useful. I'd be interested to hear what other people think.

Having CSS styling on style="..." certainly makes sense. I made the 
syntax files declarative to encourage end-user experiments! :)




More information about the textmate-dev mailing list