Login  Register

Re: Document attributes replacement for docinfo files

Posted by mojavelinux on Jun 06, 2013; 8:06am
URL: https://discuss.asciidoctor.org/Document-attributes-replacement-for-docinfo-files-tp296p300.html

Turns out you discovered a compliance bug. Good work! AsciiDoc performs attribute substitutions on docinfo files, which I didn't realize.

Filed an issue: https://github.com/asciidoctor/asciidoctor/issues/403

Resolved it: https://github.com/asciidoctor/asciidoctor/pull/404

If it looks good to you, I'll merge it in.

-Dan

p.s. In the future we may want to introduce a flag that controls which types of substitutions are performed on docinfo files. Something like:

docinfosubs: attributes,macros


On Wed, Jun 5, 2013 at 10:24 PM, Gunnar Hillert [via Asciidoctor :: Discussion] <[hidden email]> wrote:
The document attributes feature is super-nice and works nicely for asciidoc files but it seems to not work for associated docinfo files. As I am very new to asciidoc and asciidoctor, I may miss something obvious. Anyway, let's say I use an attribute in my asciidoc file {appversion} and I pass in the attribute via the asciidoctor gradle plugin:

options = [
    attributes: [
        appversion: "$version",
        ...
    ]
]

In this case the dynamic property from the Gradle build will be passed-in and replaced correctly for the adoc file. However, when I try the same for the -docinfo.xml file (in order to set a docbook meta element) it does not get replaced.

Is there something I am missing? Any workaround?

Thanks!

Cheers,

Gunnar


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Document-attributes-replacement-for-docinfo-files-tp296.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | http://google.com/profiles/dan.j.allen