Support building line blocks with markdown-it hardbreaks by jdknight · Pull Request #948 · executablebooks/MyST-Parser

Provides the ability to build docutils' line-block nodes if an inline element contains hardbreaks. When a hardbreak is detected as a child of an inline token, a line-block will be created and child tokens will be rendered into a prepared line node. Child nodes are placed into a line node until the next hardbreak is detected, where a new line node is created to hold the next child set. The process repeats until all children are processed.


This change is in relation to #877. The change should allow any translator type to handle these line breaks, without requiring the raw directive.

With a document:

# Test

PATH        to be explained \
PYTHONPATH  to be explained \
GRUB        to be explained

Example renderings:

(HTML)
image

(PDF)
image

(Confluence)
image