We have the following template to generate a PDF:
== Overview
{dynamic_tables}
The dynamic_tables
attribute shall be replaced with text that represents a table. It has to be dynamically generated, as we can't know how many tables and how many rows there are.
I tried to just pass in the text for the tables (also with \n
for line breaks), but asciidoctorj always make on line out of it and therefore fails to render a table.
How do I insert line breaks into a value, that is then passed into an attribute like {dynamic_tables}
to render line breaks? I tried a couple things (like \n
or +
) but they are just inlined as well (\n
being "ignored").
You will need a + and a line break. Within an attribute assignment, a single line break ends the assignment, but a backslash followed by a line break becomes an actual line break. So within an asciidoc file, try this:
The asciidoc code
should then render like
However I don't know whether and how it is possible to assign multi-line values on command line or with the API.