Commit 1d0a6292 authored by Dan Allen's avatar Dan Allen
Browse files

clarify the rules for include tag filtering

parent 6472abf8
......@@ -13,6 +13,9 @@ Fixed::
Added::
* Add example of how to select all lines outside of tagged regions and lines inside a specific tagged region
Changed::
* Clarify the rules for include tag filtering; emphasize that the wildcards can only be used once
== Published Q4 2020
These changes were committed and merged into the main branch starting on November 24, 2020.
......
......@@ -94,40 +94,46 @@ Notice that none of the lines with the tag directives are displayed.
The previous section showed how to select tagged regions explicitly, but you can also use wildcards and exclusions.
These expressions give you the ability to include or exclude tags in bulk.
Even if you're not including by tag, you can use the double wildcard (`**`) to ignore all lines with an include tag/end directive.
When tag filtering is used, lines containing a tag directive are always dropped.
So even if you're not including content by tags, you can specify the double wildcard (`**`) to filter out all lines that contain a tag directive.
The modifiers you can use for filtering are as follows:
`*`::
Select all tagged regions.
`**`::
Select all the lines in the document *except for lines with an include tag/end directive*.
Use this symbol if you want to include a file that has tag/end directives, but you want to ignore all those lines.
May only be specified once, whether it's negated or not.
`!`::
Negate the match.
May be applied to the single wildcard or a specific tag name.
`**`::
Select all the lines in the document *except for lines that contain a tag directive*.
Use this symbol if you want to include a file that has tag/end directives, but you want to ignore all those lines.
May only be specified once.
Cannot be negated.
The wildcards are applied first, then the exclusions are applied.
Technically, the order you list them doesn't matter, but it's customary to list them in this order.
Wildcards are always applied first, then the inclusions and exclusions are applied.
Technically, the wildcards can be placed anywhere in the list, but it's customary to put them first.
Each of the wildcards can only be used once.
Here are some of the permutations that you can use:
Here are some of the permutations you can use:
`*`:: Selects all tagged regions in the document.
`**`:: Selects all the lines in the document except for lines containing a tag directive.
`+**;*+`:: Selects all the lines outside and inside of tagged regions, but not the lines containing a tag directive.
`+**;*+`:: Selects all the lines in the document except for lines containing a tag directive.
`foo;!bar`:: Selects regions tagged _foo_, but excludes any nested regions tagged _bar_.
`foo;!bar`:: Only selects regions tagged _foo_, but excludes any nested regions tagged _bar_.
`*;!foo`:: Selects all tagged regions, but excludes any regions tagged _foo_ (nested or otherwise).
`**;!foo`:: Selects all the lines of the document except for regions tagged _foo_.
`**;!foo`:: Selects all the lines in the document except for lines containing a tag directive and regions tagged _foo_.
`+**;!*+`:: Selects only the regions of the document outside of tags (i.e., non-tagged regions).
`+**;!*+`:: Selects only the regions in the document outside of tags (i.e., non-tagged regions).
`+**;!*;foo+`:: Selects the regions of the document outside of tags (i.e., non-tagged regions) and the lines in the regions tagged _foo_.
`+**;!*;foo+`:: Selects the regions in the document outside of tags (i.e., non-tagged regions) and inside regions tagged _foo_.
There are also some shorthands if only exclusions are specified:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment