You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A workaround is to do asciidoctor-pdf -a whatever="Fish & Chips" test.adoc
which works, but is counterintuitive, especially since writing :whatever: Fish & Chips in the document header works fine.
Tried to fix this myself in asciidoctor, but I guess it is not the way to do it, since I got no comments (asciidoctor/asciidoctor#3484)
The text was updated successfully, but these errors were encountered:
The normal substitution order in the document is specialchars (i.e., XML special characters) followed by attributes. When you define attributes in the document, the specialchars substitution gets applied to the value (at assignment). This substitution is not applied to attributes passed via the CLI or API. Those values must be pre-escaped. This is just a rule.
So the correct usage is as follows:
asciidoctor-pdf -a whatever="Fish & Chips" test.adoc
The described behavior is over a decade old and changing it now would be very disruptive. So we could only do it behind a feature flag or by addressing it in the specification.
Since this behavior is in core, and Asciidoctor PDF has no control over it, I'm closing the issue on this side.
Save this text to a file and then run:
The resulting pdf looks like this:
A workaround is to do
asciidoctor-pdf -a whatever="Fish & Chips" test.adoc
which works, but is counterintuitive, especially since writing
:whatever: Fish & Chips
in the document header works fine.Tried to fix this myself in asciidoctor, but I guess it is not the way to do it, since I got no comments (asciidoctor/asciidoctor#3484)
The text was updated successfully, but these errors were encountered: