[Geany-Devel] patches to extend Markdown syntax highlighting

Carsten Allefeld carsten.allefeld at xxxxx
Wed Jun 5 13:06:54 UTC 2013


Hello Lex,

> As you say in your original email, Scintilla is a separate project.  We try
> not to have a modified Scintilla since that implies patching and testing
> every time there is an update.  So you should submit the Scintilla patches
> to that project at www.scintilla.org.  If you feel that the Markdown lexing
> is buggy, that is also where you should discuss it.

thanks for your reply. I'll talk to the Scintilla folks then.

One other question: I assume you have good reasons for choosing
Scintilla as the editor component, and generally it seems to be doing
great. While looking into the syntax highlighting stuff though: I'm
not convinced that Scintilla's approach of completely hard-coding the
syntax hightlighting in C/++ is the way to go. I'm not an expert, but
to me it seems that a syntax should be expressed in some specialized
language (BNF? regexp? ...), which is either interpreted by the lexer
engine or at least used as source to generate lexer code
automatically. So, have you ever thought of replacing Scintilla's
syntax highlighting code by your own? Before I came across Geany I
used to use Kate, which uses such an approach. However, syntaxes for
Kate are written in XML which imho isn't the right choice either...

> I am not sure if the changes to the filetypes.markdown file affect only the
> math styles, if they don't you probably should discuss it first so we can
> see if other markdown users like or loath them.

I changed more than that, true, and I don't claim the colors I chose
are necessarily the "best". However, in the original color scheme many
aspects of Markdown syntax weren't distinguished at all – many things
were just set to appear black on white like normal text. What's the
use of syntax highlighting if it's invisible?

Cheers,
Carsten


More information about the Devel mailing list