pub enum MatchType {
Passthrough,
Open(TagInfo),
Close(TagInfo),
BlockTransform(&'static str),
DirectReplace(&'static str),
}Expand description
While “TagType” determines how the tag functions at a lower level (such as how it handles arguments), this determines how the whole block functions on a greater level. They define how scopes and whole blocks of text move into the output. This still operates on the idea of “tags” though
Variants§
Passthrough
Pass this junk right out as-is
Open(TagInfo)
The match should expect an open tag, which increases scope and performs open scope rules
Close(TagInfo)
The match should expect a closing tag, which decreases scope and performs close scope rules
BlockTransform(&'static str)
Note: you can use BlockTransform to craft many kinds of generic matching, if it can use regex! It just won’t be part of the scoping rules! IE it should be an entire block! Also, the match will ALWAYS be html escaped first!