docdown icon indicating copy to clipboard operation
docdown copied to clipboard

Adds newline after h3 for github styling. Fixes #46

Open viveleroi opened this issue 8 years ago • 1 comments

As noted in the issue, github fails to render view source links correctly when preceded by an html element. The only solution I'm aware of is to force an empty line between them. Luckily, that line is not rendered:

addNode(node)

[Ⓣ][1]

Because the entryMarkdown array joins with \n and \n\n is converted into <br><br>, this solution appends an empty string (which gets converted into an empty newline). It not the nicest code but it anything else would involve potentially breaking changes to the format method.

Since the h3 and line of links are now separate elements, the h3 no longer needed a hard-coded \n. However, I wasn't sure which text you intended the .replace(/ {2,}/g, ' ') to apply to so I guessed.

viveleroi avatar Nov 30 '17 02:11 viveleroi

Can confirm. I ran into the same issue. Without a preceding line the links are broken in the Markdown output.

evanplaice avatar Sep 14 '19 20:09 evanplaice