Open Disonantemus opened 1 year ago
Thanks for the report. I'll look into this when I have some time.
I've implemented ~~~
code blocks here: https://github.com/orbitalquark/scintillua/commit/fc89283092d6f42f16674b6e165d8c5104acb662
As for the second issue you pointed out, there are two problems:
This
line, the last line should be recognized as part of the list on the previous line. Instead it's recognized as a code block.I spent some time investigating and trying things out, but I cannot figure out how to solve this. Markdown is very weird. It's possible another lexer rewrite will be needed to correct this, but I honestly don't know how I'd approach that. I'm afraid I'll have to leave this unresolved for now :(
A workaround for your case is to wrap it all in a fenced code block (backticks or tildes). I don't have a workaround for the second case I brought up.
FWIW, there is Lua Markdown parser implementation from John McFarlane of Pandoc/Commonmark. Maybe it could be adapted as a Textadept lexer.
https://github.com/jgm/lunamark/blob/master/lunamark/reader/markdown.lua
Fenced blockcode with tilde (commonmark spec) it's not supported
Fixed this (I'm not a programmer and i don't know how to PR), adding this line after
local code block =
And then changed this line to include tilde block type:
Blockcode (line, not fenced) error (edge case with lists inside)
Markdown example (indent using Tabs or 4 spaces to get blockcode line):
But I get blockcode only first & last line, I think the other lines are recognized as list.
I've tried 2 fix this, but it's tied with lists and fixing one damage the other.
Tested expected behavior with Github and: