jelovirt/org.lwdita

Don't wrap single-line list elements in paragraphs

infotexture opened this issue · 3 comments

In the original Markdown syntax for lists:

If list items are separated by blank lines, Markdown will wrap the items in <p> tags in the HTML output.

but this plug-in currently wraps all list items in paragraphs, even if they are a single word, and not separated by blank lines.

I agree with fixing this. Unfortunately e.g. examples https://dita-lang.org/lwdita/components/lw-ol.html don't seem to recognize loose and tight lists in Markdown. So it may be that this needs to work differently between Markdown and MDITA.

Definition of loose and tight lists in CommonMark.

This is something that should be behind a feature flag, because this will change the generated DITA and some users may be hit hard by this if their style guide and other transformations assume all list item content is in a paragraph. The default for markdown should likely be to support loose and tight lists; current LwDITA seems to normalize everything to loose lists.