[Geany-devel] [PATCH] Scintilla: Infinite loop in Markdown lexer

Enrico Tröger enrico.troeger at xxxxx
Sun Aug 15 12:32:59 UTC 2010


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

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: markdown.properties
Type: application/octet-stream
Size: 874 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100815/cacb4543/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100815/cacb4543/attachment.pgp>


More information about the Devel mailing list