ali-rantakari / peg-markdown-highlight

C library for Markdown syntax highlighting, using a recursive-descent parser.
Other
181 stars 36 forks source link

added support for newlines in code blocks #11

Closed pbek closed 8 years ago

pbek commented 8 years ago

blocks like this are highlighted now:

a line

2nd line
ali-rantakari commented 8 years ago

I don't see any difference when I try out this change, and am apprehensive because this change would deviate the grammar from peg-markdown. Can you please provide a reproducible test case that demonstrates the need for this?

pbek commented 8 years ago

you can use this example: http://pastebin.com/yTDJUyDk

I'm talking about newlines in code blocks.

ali-rantakari commented 8 years ago

Those are “fenced code blocks,” which PEG Markdown Highlight doesn't support at all (because peg-markdown doesn't.) It seems that trivial cases are accidentally supported, which I suppose is the source of confusion.

Please see issue #1.

pbek commented 8 years ago

But the lexer I changed already supported one tick up to five ticks and what's the issue with fenced code blocks? They work just fine with PEG Markdown Highlight. :smile_cat: