Multi-line attributes and PDF generation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Multi-line attributes and PDF generation

joster
I'm generating a custom title page in asciidoctor-pdf by monkey-patching the layout_title_page function. One of the elements that I need to use is a multi-line attribute from the document. It looks something like this:

:response-contact: W. Witch + \
Magic Sleigh Corp AG + \
Secrit Projjects Dept. + \
Narnia, Land of + \
Project ref.: some string + \
Offer Number: ATS12345678

When I use it in the body of the document, it's fine, and renders as expected. When I use it directly in my monkey-patched layout_title_page function via doc.attr 'response-contact', however, it still has the plus signs at the end of each line:

W. Witch +
Magic Sleigh Corp AG +
Secrit Projjects Dept. +
Narnia, Land of +
Project ref.: some string +
Offer Number: ATSDDMMYYYY

I could of course just strip them out myself, but that seems hackish. I'm sure there's a better way to do this, right?