Commit 8d7f4ef
[Repo Assist] fix: handle EmbedParagraphs in Markdown.ToMd serialiser (#1145)
* fix: handle EmbedParagraphs in Markdown.ToMd serialiser
Previously EmbedParagraphs fell through to the catch-all '| _' branch in
MarkdownUtils.formatParagraph, emitting a debug printfn to stdout and
yielding an empty string. All other formatters (HTML, LaTeX) delegate
to cmd.Render() and recurse; this commit brings the Markdown-to-Markdown
back-end into line with them.
The now-dead catch-all branch is removed so the exhaustiveness checker
will catch any new MarkdownParagraph cases that are added without a
corresponding formatParagraph clause.
Fixes: the debug 'can't yet format' output that appeared on stdout
whenever a document containing EmbedParagraphs was serialised via
Markdown.ToMd.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* ci: trigger checks
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Don Syme <dsyme@users.noreply.github.com>1 parent 3a8d8c3 commit 8d7f4ef
3 files changed
Lines changed: 16 additions & 3 deletions
File tree
- src/FSharp.Formatting.Markdown
- tests/FSharp.Markdown.Tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
284 | | - | |
285 | | - | |
| 283 | + | |
286 | 284 | | |
287 | 285 | | |
288 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1417 | 1417 | | |
1418 | 1418 | | |
1419 | 1419 | | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
0 commit comments