Does it exist in Asciidoc (rendered by Asciidoctor) a way to have a block of text where asciidoc formatting is not applied, but it keeps the asciidoc paragraph format (background color, font, font color, etc...) and not preformated format ?
I have a paragraph that I want to render "as I type it"
Array(Element1, Element2, Element3)
Currently, it renders as follow:
And I want to render it as follow:
I tried to use code block or literal block, but text appears as preformated, which I don't want:
----
Array(
Element1,
Element2,
Element3
)
----
Or
[literal]
....
Array(
Element1,
Element2,
Element3
)
....
Gives me the following output:
I managed to get what I want by using [%hardbreaks] option to keeping line breaks and by using {nbsp} built-in attribute for non-breaking spaces.
Here is the complete code:
[%hardbreaks]
Array(
{nbsp}{nbsp}Element1,
{nbsp}{nbsp}Element2,
{nbsp}{nbsp}Element3
)