flexmark-java icon indicating copy to clipboard operation
flexmark-java copied to clipboard

(<pre>) preformatted text is not working when there is a blank line

Open sunita1112 opened this issue 3 years ago • 1 comments

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.

# Test
Foo
<pre>
# Foo001
# Foo002

# Foo003
</pre>
# Foo004

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!

sunita1112 avatar Mar 16 '22 07:03 sunita1112

Hi @vsch

We have been using flexmark in our app from quite long. And this issue was reported by one of our customer. Will you please help in this issue? Thanks

sunita1112 avatar Mar 17 '22 07:03 sunita1112