Class DiffMarkupFormatter
A markup formatter, that skips any special Blazor attributes added by the Htmlizer.
public class DiffMarkupFormatter : PrettyMarkupFormatter, IMarkupFormatter
- Inheritance
-
HtmlMarkupFormatterPrettyMarkupFormatterDiffMarkupFormatter
- Implements
-
IMarkupFormatter
- Inherited Members
-
PrettyMarkupFormatter.Comment(IComment)PrettyMarkupFormatter.Doctype(IDocumentType)PrettyMarkupFormatter.Processing(IProcessingInstruction)PrettyMarkupFormatter.Text(ICharacterData)PrettyMarkupFormatter.IndentationPrettyMarkupFormatter.NewLineHtmlMarkupFormatter.LiteralText(ICharacterData)
- Extension Methods
Constructors
DiffMarkupFormatter()
Initializes a new instance of the DiffMarkupFormatter class.
public DiffMarkupFormatter()
Fields
Instance
Gets an instance of the DiffMarkupFormatter.
public static readonly DiffMarkupFormatter Instance
Field Value
Remarks
The DiffMarkupFormatter is not thread safe, so using this singleton instance to format elements may not result in the desired effect.
Methods
Attribute(IAttr)
Creates the string representation of the attribute.
protected override string Attribute(IAttr attr)
Parameters
attr
IAttrThe attribute to serialize.
Returns
- string
The string representation.
CloseTag(IElement, bool)
Formats closing a tag with the given name.
public override string CloseTag(IElement element, bool selfClosing)
Parameters
element
IElementThe element to close.
selfClosing
boolIs the element actually self-closing?
Returns
- string
The formatted closing tag.
ConvertToString(IAttr)
Creates the string representation of the attribute.
public string ConvertToString(IAttr attr)
Parameters
attr
IAttrThe attribute to serialize.
Returns
- string
The string representation.
OpenTag(IElement, bool)
Formats opening a tag with the given name.
public override string OpenTag(IElement element, bool selfClosing)
Parameters
element
IElementThe element to open.
selfClosing
boolIs the element actually self-closing?
Returns
- string
The formatted opening tag.