In my current Asciidoctor document I have an atribute that I want to use in a codeblock. Is there a way to do String interpolation in a codeblock?
Attribute in header..
:api_version: 1.0
Codeblock
{
"api_version" : "{api_version}",
}
I seem unable to do String replacement, any hints or tips to do String replacement in code block?
You can apply substitutions like this:
.Example list of dependency RPMs:
[subs="verbatim,attributes"]
----
jdk-{java_version}-fcs.x86_64 <1>
jre-{java_version}-fcs.x86_64 <1>
sun-javadb-core-10.6.2-1.1.i386
sun-javadb-client-10.6.2-1.1.i386
sun-javadb-javadoc-10.6.2-1.1.i386
sun-javadb-demo-10.6.2-1.1.i386
sun-javadb-common-10.6.2-1.1.i386
sun-javadb-docs-10.6.2-1.1.i386
----
<1> Either the `jdk` or `jre` rpm must be installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With