then “LINE 2” will display immediately below “LINE 1” wihtout a line break. Is it possible to force the insertion of a line break? Kirby does not seem to follow the markdown standard in this regard.
Anyone know how to force a line break below a # / h1
IMHO, line breaks only make sense within paragraph tags to start a new line, e.g. when setting poetry or in an address or sth. like that. What is the purpose of using as <br> tag when using block level elements?
I still don’t see why you can’t solve that via CSS instead of inserting line breaks. If need be, you could activate markdown.extra and attach a class to the headlines without a adjacent paragraph to style it separately.
@texnixe - you’re right I could solve this with markdown extra by specifying a class for the header that doesn’t have a paragraph below it. I was hoping there would be a simpler solution. Another way I could imagine solving this is having an empty <p> element below the second <h1> (from my example above), but I haven’t figured out how to induce kirby into generating an empty <p>
There are several contexts where single line breaks are semantically perfectly fine and should not be styled with any CSS-hacks at all. Let’s say, an address label block or lyrics. Therefore standard markdown implementations including Kirbytext support ending a line with a double space and a standard carriage return resulting in a HTML-compliant <br/>.
I’ve come to the same problem: A H2 and I need a forced line break in it.
Text example: Sehr geehrte Kunden, wir freuen uns über Ihren Besuch.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. …
It should have the status and styling of a H2 because there is no other headline and it has the same value like the headline on other pages.
I tried the double space methode but it didn’t work.
Telling the customer they have to use another class in this case isn’t a real option. If it looks like a H2 they won’t understand why it couldn’t be a H2.
Also I can think of other cases when you need a forced line break in a Headline:
Sommer, die schönste Urlaubszeit!
I hope you have another suggestion to implement this then css.
EDITED: following is not correct… see post below.
headlines are not allowed to have childs. h2 > br is not valid. but… most browsers will render it correctly.