[TxMt] Markdown syntax highlighting

Nigel Green nigel at greenlemur.com
Wed Jan 16 15:52:21 UTC 2008


A quick query...

When working in Markdown, the language grammar only seems to pick up  
headings if they have a blank line (or another heading) above them. So  
for instance, this:

# Heading 1
## Heading 2
some text here

## Heading 3
some text here

... is fine, and all headings are recognised as such and coloured  
correctly. However, I use { and } in my Markdown documents to enable  
folding, and this:

# Heading 1
## Heading 2 {
some text here
}
## Heading 3 {
some text here
}

... would make Heading 3 not be picked up as a heading, even though  
the Markdown script will pick it up as such and convert to HTML  
properly.

Is it possible to change the language grammar so that the headings  
with no blank line above are picked up? At the moment I have to leave  
a blank line between all my folded text and I'd like not to have to.  
I've had a go at this but my regex-fu is not strong and I ended up  
breaking all the highlighting...

Many thanks,
Nigel



More information about the textmate mailing list