[txmt-dev] Re: Grammar parser multiline match?

Michael Sheets mummer at whitefalls.org
Tue Nov 5 11:08:06 UTC 2013


On Nov 4, 2013, at 4:11 PM, Per Persson <persquare at mac.com> wrote:

> when working with Markdown, I prefer using Setext title (===) and subheading (---) for level 1 and 2 headings respectively.
> However, Setext headings have some quirks in that they 
> 	1) show up as === or --- in the symbol popup rather than the heading text, and 
> 	2) the heading text doesn't have a distinct scope assigned

Matches in a grammar (and in bundle items in general*) can only target a single line, no multi-line matches. This is done for performance reasons as if you could target multiple lines it would require significant re-parsing with every keystroke. This is the reason you see the slightly odd scoping of the ‘setext’ style headers.

* A notable exception being the firstLineMatch.


More information about the textmate-dev mailing list