Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Blocks #29

Open
slzatz opened this issue May 28, 2020 · 1 comment
Open

Code Blocks #29

slzatz opened this issue May 28, 2020 · 1 comment
Labels
feature Feature Request

Comments

@slzatz
Copy link

slzatz commented May 28, 2020

First of all, thanks for this work -- it's very helpful.

Currently code blocks are supported with three backticks but the original markdown spec is that 4 spaces or a tab at the beginning of a line mark a code block and this does not appear to be supported. There are a lot of markdown documents that employ that approach -- is it possible to support this syntax?

@progsource
Copy link
Owner

Sorry for my late reply.

So - it is possible to implement this with the current maddy version. It would need a new Block Parser (IndentedCodeBlockParser) - that one would have to check for the number of spaces at the beginnings of the line and should not directly stop on an empty line, but only if the line afterwards is not an indented block anymore. For that maybe also the Parser class would need to be able to go over one line twice - or the parsers need to be able to get a look-ahead.
Another solution would be to stop the IndentedCodeBlockParser only after two empty lines.

@progsource progsource added the feature Feature Request label Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants