When using the following option configuration:
new MutableDataSet( PegdownOptionsAdapter.flexmarkOptions( Extensions.ALL ) ) ,
the parser/renderer adds 2 line breaks instead of one when using 2 trailing spaces followed by a line break.
Example markdown
line one with line break
line two with line break
line three with line break and 2 trailing spaces
line four at the end
Expected result
line one with line break
line two with line break
line three with line break and 2 trailing spaces
line four at the end
Given result
line one with line break
line two with line break
line three with line break and 2 trailing spaces
line four at the end
My current fix is to change the options to:
options = new MutableDataSet( PegdownOptionsAdapter.flexmarkOptions( Extensions.ALL & ~Extensions.HARDWRAPS ) );
options.set(HtmlRenderer.SOFT_BREAK, "<br/>");
When using the following option configuration:
new MutableDataSet( PegdownOptionsAdapter.flexmarkOptions( Extensions.ALL ) ),the parser/renderer adds 2 line breaks instead of one when using 2 trailing spaces followed by a line break.
Example markdown
Expected result
line one with line break
line two with line break
line three with line break and 2 trailing spaces
line four at the end
Given result
line one with line break
line two with line break
line three with line break and 2 trailing spaces
line four at the end
My current fix is to change the options to: