parseInlines
Parses inline markdown content from raw text into a list of Inline nodes.
Handles:
Backslash escapes
Code spans
Emphasis and strong emphasis (
*and_)Hard breaks (two spaces + newline, or
\+ newline)Soft breaks (newline)
Links and images (inline, reference, collapsed, shortcut)
Autolinks and raw HTML
HTML entities
Plain text
The algorithm works in two phases:
Tokenize the input into a flat list of inline tokens (content + delimiter runs)
Apply the emphasis matching algorithm (CommonMark §6.2) to produce nested inlines