Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Line break problem

Started by Muut Archive 11 years ago · 1 replies · 363 views
11 years ago

When i edit text and add two spaces after the end of a line, i get a line break ( <br> ) in the html output. But if i need a second <br> and try it with two additional spaces are two spaces after the return, it did not work. Only manual adding <br> in the text works. But this is not a fine solution. I know such tags, but the end user for the website are not able to using html syntax later and this additional <br> makes the text not so readable.

11 years ago

Is this Markdown you are editing? If so it should output paragraphs, not line-breaks, which you should style with CSS. Whilst double-spaces can create a line-break, it is not advisable for just the reason you outlined: You end up relying on manual formatting occasionally.

As Grav uses GitHub-Flavored-Markdown through Parsedown, you can use regular line-breaks (not HTML, just line skipping) to achieve the desired separation of single and double line-breaks (see cheatsheet).

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1350 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4061 9 years ago
Archive · by Muut Archive, 9 years ago
1 2948 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago