Commit 24dd8d2
committed
fix: rendering of Markdown inline formatting and bullet lists (#1156)
Markdown inline formatting (**bold**, *italic*, `code`) and bullet lists
using "- " markers were not rendered in the HTML output.
Inline formatting:
- Add `appendMarkdownInlines()` to parse **bold**, *italic*, and `code`
spans in text nodes, producing `StrongInline`, `EmphInline`, and
`CodeInline` nodes respectively.
- Call it from `visitText()` so all text nodes are processed.
- Add a markup/b.html.hbs partial to render <strong> tags.
- Add doc/inline.html.hbs to dispatch text, strong, emph, and code
inline kinds to their partials without emitting extraneous blank
lines.
List detection and conversion:
- Add list marker detection functions that recognize "- " at the start
of text, after newlines, after ":" or "." punctuation, and at trailing
positions within already-started lists.
- Add `convertParagraphWithLists()` to split a paragraph containing list
markers into a prefix paragraph and a `ListBlock`.
- Apply list detection in `visitParagraph()`, `@par` blocks, and `@li`
blocks so that Markdown lists are converted in all contexts.1 parent 58bf524 commit 24dd8d2
File tree
5 files changed
+436
-9
lines changed- src/lib/AST
- test-files/golden-tests/javadoc
- brief
- inline
5 files changed
+436
-9
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments