Page 1 of 2

Markdown Lexer & Snippets

Posted: 22.01.2014 10:36
by NoSi
I spent some time on creating a new markdown lexer from scratch, together with some (for me) useful snippets. Appending zip-file contains the result of my attempts.

See readme.html for details.
Feedback is welcome.

Posted: 22.01.2014 13:23
by Alexey
I see it;s compex. On what MD files do u test it? I try to test on md files from readme\WikiBackup.rar, and see Actions.md file links aren't hilited. Can u fix.

Posted: 22.01.2014 14:09
by NoSi
I aligned to standard markdown, where [whatever] is not a link.

action.md does not contain links in correct markdown syntax. This is text in square brackets.

Code: Select all

[Text](address "title") or [Text][Ref]  

[Ref]: address "title"
are links in standard markdown. I added a rule for wiki links. Appending ZIP contains modification (not well tested).

Posted: 22.01.2014 15:32
by Alexey
This lexer 's used in SW now.

Posted: 23.01.2014 08:27
by Stefan
Great job, NoSi.
Judging from a first glance, it is really very impressive. Well documented, actually mouth-watering. I am looking forward to checking it out as soon as my time permits. This deserves an in-depth reading for which I need a quiet weekend without distractions.

Thanks a ton for sharing :D

Posted: 01.04.2015 11:12
by Stefan
Is it possible to see headings in the tree without their level indicators (# ## ### etc?)
Also, it were great if the tree could be made to show headings hierarchically, indented by levels, to quickly fold them by level number.

The preview in lexer customize shows folding for headings til the next heading comes around. But in my files this does not happen. What setting do I have to tweak to automatically fold all ## headings til the next ## subheading comes around?

Posted: 01.04.2015 16:34
by Alexey
> tree without their level indicators (# ##
no, As i see, ====, ### are inside token, so can't skip it.

Posted: 01.04.2015 16:49
by Alexey
Foldin. Will fix, next upd...

Posted: 02.04.2015 20:10
by Stefan
Thanks. I am away for the weekend, will check it out next Tuesday. Happy Easter holidays.

Posted: 08.04.2015 06:23
by Stefan
Thank you. Nice job, folding makes it so much easier to quickly scan large texts. :P
The ultimate luxury, of course, if it were possible to nest it, level 3 headings inside level 2 headings inside level 2 headings. Not meaning to be greedy, just wondering .... Had tried to understand how nesting works in html, but couldn't really pull it off for markdown. :oops: