The bulk of the content in a document is paragraph text. This is why Asciidoctor doesn’t require any special markup or attributes to specify paragraph content. You can just start typing.
In Asciidoctor, adjacent or consecutive lines of text form a paragraph element. To start a new paragraph after another element, such as a section title or table, hit the RETURN key twice to insert a blank line, and then continue typing your content.
This journey begins one late Monday afternoon in Antwerp. Our team desperately needs coffee, but none of us dare open the office door. To leave means code dismemberment and certain death.
This journey begins one late Monday afternoon in Antwerp. Our team desperately needs coffee, but none of us dare open the office door.
To leave means code dismemberment and certain death.
Since adjacent lines of text are combined into a single paragraph when Asciidoctor converts a document, that means you can wrap paragraph text or put each sentence or phrase on a separate line. The line breaks won’t appear in the output.
However, if you want the line breaks in a paragraph to be preserved, you can either use a space followed by a plus sign (
+) or the
This results in a visible line break (e.g.,
<br>) following each line.
Rubies are red, + Topazes are blue.
Rubies are red,
Topazes are blue.
[%hardbreaks] Ruby is red. Java is black.
Ruby is red.
Java is black.
Alternatively, you can preserve line breaks throughout your whole document by adding the
hardbreaks attribute to the document’s header.
= Line Break Doc Title :hardbreaks: Rubies are red, Topazes are blue.