Label parameter matrix
Both the Hide If and Show If macros for Visibility feature the Label parameter. The following is a complete matrix of behaviors when using the Label parameter.
This may help users who prefer using labels with a dash "-" prefix (e.g. "-review") and how the Label parameter behaves when it encounters such labels.
Labels in macro parameter | Page labels | Show If | Hide If | Match Any |
a, b, c | a, b, c, d | true | true | Should match a/b/c |
a, b | a, b, c, d | true | true | Should match a/b |
a | a, b, c, d | true | true | Should match "a" |
b, e | a, b, c, d | true | true | Should match "b" |
- | - | true | true | Should match "-" |
-e | a, b, c, d | true | true | Should match since there is no label "e" |
a, -e, -f | a, b, c, d | true | true | Should match "a" |
page- | page- | true | true | Should match "page-" |
-e, -f | a, b, c, d | true | true | Should match since there are no labels "e", "f" |
page- | -page- | false | false | Should not match since "page-" is negated |
- | -- | false | false | Should not match since there is no label “-” |
--a | -a | false | false | A page label can start with "-". Should not match since the label "-a" is negated |