Commit 7d523f7
md: emit newline before closing fence in codeBlock
The codeBlock renderer wrote the closing backtick fence directly after
the node literal. When the literal did not end with a newline (as with
a manually constructed ast.CodeBlock), the result was malformed markdown
like 'val x : Int = 42```' on a single line.
Emit a newline before the closing fence when the literal does not
already end with one. Also correct the expected string in
TestRenderCodeBlock to end with \n\n (matching doubleSpace semantics
used by every other test in this file).1 parent 134a5b2 commit 7d523f7
2 files changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
267 | 270 | | |
268 | 271 | | |
269 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
0 commit comments