include tags

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

include tags

asotobu
As mention in the documentation if I have next document:

// tag::snippets[]
// tag::snippet-a[]
snippet a
// end::snippet-a[]

// tag::snippet-b[]
snippet b
// end::snippet-b[]
// end::snippets[]


And next include macro:

include::file-with-snippets.adoc[tag=snippets]

Then the output is:

snippet a

snippet b


But I would like to be able to do something like:

include::file-with-snippets.adoc[tag=snippets, !snippet-b]

Which would render to:

snippets-a

Of course there is a workaround which is delimited all the sections you need but it is a tedious job and not always possible. I can try to implement it in asciidoctor if you agree it is a good addition.
Reply | Threaded
Open this post in threaded view
|

Re: include tags

mojavelinux
Administrator

On Wed, Apr 22, 2015 at 2:46 PM, asotobu [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Of course there is a workaround which is delimited all the sections you need but it is a tedious job and not always possible. I can try to implement it in asciidoctor if you agree it is a good addition.

I do think this is a good addition. It should be relatively straightforward to implement since we are already working line-by-line. The next step would be to file an issue so we don't forget about it. Then, if you'd like to try to implement it, I definitely encourage you to give it a shot!

Cheers,