Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't render single newlines as line-breaks #40

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

thomaseizinger
Copy link
Contributor

When rendering markdown, single newlines are typically ignored and only double newlines are rendered as a new paragraph.

This allows for each sentence to be on a new line without introducing unnecessary line breaks in the rendered document. Keeping each sentence on a new line makes reviews easier and plays well with Git which tracks changes on a line-by-line basis. It also eases collaboration of documents in GitHub's PR process through the "suggestion" feature.

Here are two screenshot comparing the two renderings.

breaks: false (the default) breaks: true
Screenshot from 2023-01-13 14-42-10 Screenshot from 2023-01-13 14-42-16

As we can see, the rendering is identical. Changing this setting will allow us to use "one sentence per line" in future posts. It is however not mandatory in case some authors don't want to use it.

I am not sure it is worth to convert existing posts.

Copy link
Member

@p-shahi p-shahi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@p-shahi p-shahi merged commit 304be37 into libp2p:main Jan 13, 2023
@thomaseizinger thomaseizinger deleted the no-line-breaks-single-newline branch January 13, 2023 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants