Closed yannham closed 3 months ago
Doesn't this regress the example in #1520?
Argh, that's a good point. That being said, I feel this time this is really a comrak issue: it should insert a newline between a list and the following block, but it doesn't. @jneem if you have a branch with the latest comrak, could you see if this has changed in the latest version?
Otherwise another solution (which I actually implemented initially) is to check if the next element is a paragraph manually, and insert the hard line only in this case. It's not too hard, but just doesn't feel right after having read the commonmark spec.
Fixes #1706.
The code generating markdown documentation from a Nickel configuration used to unconditionally insert hard line breaks between a field's signature and the rest of its documentation. However, one can't insert a hard line break immediately followed by a blocks in commonmark (or put differently: it's not representable as a source), and those line breaks were just rendered as spurious backslashes at best, or sometimes interpreted differently (see #1706 for more details).
A bit of experimentation showed that what comes after this line break is always a block in the sense of commonmark (even when it's simple documentation text, it's wrapped as a Markdown paragraph). Thus this PR just removes the line break altogether, which is not useful and never legal anyway.