GenericAttributesParser Class
An inline parser used to parse a HTML attributes that can be attached to the previous Inline or current Block.
public class GenericAttributesParser : InlineParserSee also
- Inheritance
InlineParserGenericAttributesParser
Constructors
| Name | Description |
|---|---|
| GenericAttributesParser() | Initializes a new instance of the GenericAttributesParser class. |
GenericAttributesParser()
GenericAttributesParser.csInitializes a new instance of the GenericAttributesParser class.
public GenericAttributesParser()Properties
| Name | Description |
|---|---|
| AttributeFilter | Gets or sets the predicate that decides whether an attribute parsed from the Markdown (other than the id and the classes) is kept. The default value is GenericAttributesExtension.IsSafeAttributeName. |
AttributeFilter
GenericAttributesParser.csGets or sets the predicate that decides whether an attribute parsed from the Markdown (other than the id and the classes) is kept. The default value is GenericAttributesExtension.IsSafeAttributeName.
Property value
Methods
| Name | Description |
|---|---|
| Match(InlineProcessor, StringSlice) | Attempts to match the parser at the current position. |
| TryParse(StringSlice, HtmlAttributes?) | Tries to extra from the current position of a slice an HTML attributes {...} |
Match(InlineProcessor, StringSlice)
GenericAttributesParser.csAttempts to match the parser at the current position.
public override bool Match(InlineProcessor processor, ref StringSlice slice)TryParse(StringSlice, HtmlAttributes?)
GenericAttributesParser.csTries to extra from the current position of a slice an HTML attributes {...}
public static bool TryParse(ref StringSlice slice, out HtmlAttributes? attributes)Parameters
sliceStringSlice- The slice to parse.
attributesHtmlAttributes?- The output attributes or null if not found or invalid
Returns
bool true if parsing the HTML attributes was successful