Markdown Lexer & Snippets

All questions regarding lexer highlighting schemes are discussed here...
NoSi
Posts: 4
Joined: 23.12.2013 14:25

Markdown Lexer & Snippets

Post 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.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post 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.
NoSi
Posts: 4
Joined: 23.12.2013 14:25

Post 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).
Attachments
MARKDOWN.zip
Lexer Update
(31.71 KiB) Downloaded 106 times
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

This lexer 's used in SW now.
Stefan
Posts: 112
Joined: 06.10.2012 15:06

Post 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
Stefan
Posts: 112
Joined: 06.10.2012 15:06

Post 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?
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

> tree without their level indicators (# ##
no, As i see, ====, ### are inside token, so can't skip it.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Foldin. Will fix, next upd...
Stefan
Posts: 112
Joined: 06.10.2012 15:06

Post by Stefan »

Thanks. I am away for the weekend, will check it out next Tuesday. Happy Easter holidays.
Stefan
Posts: 112
Joined: 06.10.2012 15:06

Post 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:
Locked