On Sat, 14 Aug 2010 19:25:43 +0200, Colomban wrote:
Hi,
As reported in Debian's bug #590284 [1] the Scintilla Markdown lexer has a bug that causes an infinite loop on certain circumstances.
In facts, it happens when HasPrevLineContent() is called on the second line and the first line is empty, because of a negative index error. Joined a patch that fixes the issue (and also fixes highlighting if the first title is one-character only). Joined is a patch that fixes the issue [2]
Cool, thanks.
I haven't reported the bug to Scintilla yet, even if it seems to still be present in current Mercurial version, because I can't find out how to use the Markdown lexer with SciTE, so I can't test; but I also attach the slightly-tuned patch for Scintilla [3] (it's exactly the same except for a trailing whitespace that is in the Geany's Scintilla copy but not upstream). If anyone can test and/or tell me how to do, it'd be cool :)
It took me some time to figure out how it works but you can add Markdown as filetype by placing the attached markdown.properties file into Scite's datadir ($prefix/share/scite) and edit SciTEGlobal.properties, there are several places where you need to add it, I just searched for YAML and replaced it with markdown :).
Regards, Enrico