Saturday, April 3, 2010

Markdown jEdit mode

I was writing a few docs in Markdown syntax. I wanted a Markdown mode file for jEdit. The best I could find was by Ali Rantakari on his blog. It was a good start but I thought I could make a few improvements. I got a chance to write my own Markdown mode file for jEdit, using his as inspiration. Compared to his I think I made the following improvements:

  • better blockquote handling.
  • more intuitive link highlighting
  • better block html handling and general html highlighting

I found jEdit mode files a bit limiting and harder to write than I thought it would be. I spent a bunch of time trying to work around the limitations of regexs' not spanning multiple lines and span capturing not ending where it should.

My Markdown mode file is on and was tested using jEdit 4.3.1 .

Hope it helps someone out.