Hi there,
I use Markdown format for all of my plain text files - both to convert to HTML for export and to help organise my files. I find the syntax highlighting of headings and lists really helps me keep large files organised - especially with using curly braces to 'section' material and keep it folded away.
Is it possible to change the way headings are recognised? In particular I would like to have the following:
## Heading 1 { Some text in here... } ## Heading 2 { Some text in here... } ## Heading 3 { Some text in here... }
This currently only picks up the first heading, seeing the others as meta.paragraph.markdown, whereas leaving in line breaks: ## Heading 1 { Some text in here... }
## Heading 2 { Some text in here... }
## Heading 3 { Some text in here... }
Means I get all the headings recognised correctly. Both versions above are recognised and converted to HTML correctly by the Markdown.pl script so I presume the highlighting is down to the language grammar? I looked at it and tried to change it myself but broke all the other formatting as well so think I need some professional input on this one!
I know its not a life-changing query but I'd like to understand the language grammar stuff better and this looks like a good starter project!!
Thanks, Nigel
On 8. May 2007, at 12:52, Nigel Green wrote:
[...] Is it possible to change the way headings are recognised? In particular I would like to have the following:
## Heading 1 { Some text in here... } ## Heading 2 { Some text in here... } [...] Means I get all the headings recognised correctly. Both versions above are recognised and converted to HTML correctly by the Markdown.pl script so I presume the highlighting is down to the language grammar? I looked at it and tried to change it myself but broke all the other formatting as well so think I need some professional input on this one!
If Markdown recognizes the above (as it does) we should fix the grammar.
Recent Markdown beta also made a slight change to how links are recognized, so I am going to update the grammar shortly, just waiting for John to classify a few new problems (with his latest beta) as either bugs or by design, so I know how to update syntax highlighting for these ;)
I know its not a life-changing query but I'd like to understand the language grammar stuff better and this looks like a good starter project!!
The Markdown grammar is IMO quite nicely structured and all, but it’s also pretty hardcore, because it has some monster regexps and it “hides” some implicit Markdown rules about when which block level element breaks a paragraph etc.