Forem Creators and Builders 🌱

Siddharth
Siddharth

Posted on

Join lines separated by one newline into one paragraph

Feature request

In a blog post, if you put your content like this:

This is a line, which contains some dummy content to make you read the paragraph. Keep reading, because we need some more content.
This is a line, which contains some dummy content to make you read the paragraph. Keep reading, because we need some more content.
This is a line, which contains some dummy content to make you read the paragraph. Keep reading, because we need some more content
Enter fullscreen mode Exit fullscreen mode

It's rendered as:

This is a line, which contains some dummy content to make you read the paragraph. Keep reading, because we need some more content.
This is a line, which contains some dummy content to make you read the paragraph. Keep reading, because we need some more content.
This is a line, which contains some dummy content to make you read the paragraph. Keep reading, because we need some more content.

Output

Output

But it will be better to render it like this:

This is a line, which contains some dummy content to make you read the paragraph. Keep reading, because we need some more content. This is a line, which contains some dummy content to make you read the paragraph. Keep reading, because we need some more content. This is a line, which contains some dummy content to make you read the paragraph. Keep reading, because we need some more content.

Which conforms to the markdown spec and is more readable.

Summary

Join lines separated by one newline into one paragraph

Why is it needed?

It makes the blog post content easier to read and write, as we don't need to maintain long paragraphs and we also don't want to read awkward paragraphs.

Suggested solution(s)

Make the markdown renderer join lines separated by one newline into one paragraph.

Related issue(s)/PR(s)

N/A

Top comments (3)

Collapse
 
michaeltharrington profile image
Michael Tharrington • Edited

I'm a bit confused... I think you are saying that if I have one sentence and another sentence after it on a new line, like such:

This is a sentence.
This is another sentence.
Enter fullscreen mode Exit fullscreen mode

That these two sentences should be in the same paragraph like this:

"This is a sentence. This is another sentence."

Rather than like this:

"This is a sentence.
This is another sentence."

Is this correct?

Collapse
 
siddharthshyniben profile image
Siddharth

Yes, exactly. That's how markdown works

Collapse
 
michaeltharrington profile image
Michael Tharrington • Edited

Gotcha! That's what's up good to understand where you're coming from here.

While what you're saying makes sense to me, this request kind of goes against the grain as many other requests that we're seeing are pushing for us to make our editor less Markdown-centered and more WYSIWYG.

We'll definitely take this into account either way though! Appreciate the request and thanks for helping to clarify.