pub struct ScopeInfo {
pub only: Option<Vec<&'static str>>,
pub double_closes: bool,
pub emit: EmitScope,
}Expand description
Information about a scoped tag with open and close elements. This gives you the power to craft many kinds of markup, not just bbcode, and have it understand scope
Fields§
§only: Option<Vec<&'static str>>A list of MatchInfo ids for tags which are allowed to be parsed within the body of
this scope. If None, any tag is allowed (default)
double_closes: boolWhether or not this scope automatically closes previous scopes of the same type. Generally this isn’t how tags work: doing [b][b][b]EXTRA BOLD[/b][/b][/b] produces triple bold text. However, elements like [*] (list item) benefit from closing the previous scope if it’s the same type
emit: EmitScopeThe core of the parsing system: your provided closure which transforms the pre-parsed data given into HTML (or whatever)