Prevent nesting of text markup of the same type.

This greatly reduces the amount of detect element calls that are occurring.
This commit is contained in:
Tom Alexander
2023-09-07 02:01:34 -04:00
parent 6676012eb1
commit 6b82b46e09
3 changed files with 47 additions and 11 deletions

View File

@@ -21,6 +21,9 @@ pub enum ContextElement<'r, 's> {
/// Stores the name of the current element to prevent directly nesting elements of the same type.
Context(&'r str),
/// Stores the name of the current object to prevent directly nesting elements of the same type.
ContextObject(&'r str),
/// Indicates if elements should consume the whitespace after them.
ConsumeTrailingWhitespace(bool),