CommonMark/Markdown Java parser with source level AST. CommonMark 0.28, emulation of: pegdown, kramdown, markdown.pl, MultiMarkdown. With HTML to MD, MD to PDF, MD to DOCX conversion modules.
BSD 2-Clause "Simplified" License
2.22k
stars
261
forks
source link
(<pre>) preformatted text is not working when there is a blank line #499
I have this markdown content, but the parser does not considers consider content after blank line i.e # Foo003 as pre-formatted text but renders as heading.
We tried setting Parser.HTML_BLOCK_DEEP_PARSE_BLANK_LINE_INTERRUPTS to false, it works but again following example (not able to render list) breaks and may be other scenarios.
Eg:
## The universal markup converter
Pandoc is a [Haskell](https://haskell.org) library for converting from
one markup format to another, and a command-line tool that uses this
library. It can convert *from*
<div id="input-formats">
- `bibtex` ([BibTeX](https://ctan.org/pkg/bibtex) bibliography)
- `biblatex` ([BibLaTeX](https://ctan.org/pkg/biblatex) bibliography)
- `commonmark` ([CommonMark](https://commonmark.org) Markdown)
</div>
Could you suggest safer option to fix it? Thank you!
I have this markdown content, but the parser does not considers consider content after blank line i.e # Foo003 as pre-formatted text but renders as heading.
We tried setting Parser.HTML_BLOCK_DEEP_PARSE_BLANK_LINE_INTERRUPTS to false, it works but again following example (not able to render list) breaks and may be other scenarios. Eg:
Could you suggest safer option to fix it? Thank you!