Re: glossary conundrum
Posted by
1marc1 on
Feb 24, 2020; 11:49am
URL: https://discuss.asciidoctor.org/glossary-conundrum-tp7578p7666.html
Alexander,
I have been thinking about this for a bit, wrapping my head around what "**" actually does, but I find it difficult to come up with a concise description.
My understanding of the "**" filter is that it will include the entire document, except individual lines containing a tag/end tag directive. This means that the text between the start and end of the tag directives is also included with this filter applied.
My initial understanding was that because the tag directives were excluded, so was the content between them. That's where I went wrong.
To clarify your solution
include::tags.adoc[tags=**;!*;group1]
"**" includes the entire document (minus individual lines that say things like // tag::group1[] and // end::group1[])
"!*" gets rid of all text between // tag and // end.
"group1" then includes the individual group.
For the benefit of others, you can also use an attribute that resolves to a tag name inside your include line.
For example:
:mygroup: group1
include::tags.adoc[tags=**;!*;{mygroup}]
Marc.