-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
I learned from a helpful tip that pandoc supports multi-line headings when reading commonmark and its variants, like gfm. The tip gives this example:
The Hobbit\
or\
There and Back Again
====================
However, as of pandoc 3.8.3, the commonmark writer does not take advantage of this to preserve line breaks in headings, so feeding the above input through pandoc -f commonmark -t commonmark produces the following:
# The Hobbit or There and Back Again
This can also be seen with Try Pandoc.
I would classify the lack of parity between the reader and the writer as a bug, but if you say it's a missing feature, I would accept that.
This bug or missing feature isn't blocking me from doing anything at present. In the past, I've resorted to workarounds with spans and filters or CSS to get line breaks in headings, but I'm not working on such a problem now. The existing setext support is sufficient if I read commonmark and write another format, but when I set up an e-text project by converting from docx or HTML, it would be useful to preserve line breaks in headings so that I don't have to put them back manually.