Single newlines in Markdown are rendered as hard line breaks instead of spaces #999
Unanswered
kercsoj
asked this question in
0. General bugs and questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We write our documentation as plain Markdown files and then use the GitHub Sync plugin to synchronize them with GitBook.
The problem is that when the Markdown wrapped (eg at 80 characters) — using single line breaks within a paragraph — GitBook’s renderer treats every newline as a hard break (
<br>
), rather than the CommonMark-compliant behavior of treating a single newline as a space and only a blank line (two consecutive newlines) as a paragraph break. This results in documentation that looks broken.Here are two examples from two different websites which uses Gitbook:
Source: https://docs.bucket.co/supported-languages/browser-sdk/globals
Source: https://developerdocs.instructure.com/services/canvas
So a if I have a Markdown file like:
It should be rendered as:
Instead of
I don't remember seeing this issue in earlier versions of Gitbook. Did anyone experienced similar issue? How did you manage to solve it?
Thanks,
Jozsef
Beta Was this translation helpful? Give feedback.
All reactions