Back to API Reference
Class

TagParseRule

abstract
Inherits:ParseRule

Base class for parsing XML-style markup tags (e.g., <b>, <color=#FF0000>).

Remarks

Derived classes override TagName to specify the tag name to match. Parameters are always optional: <tag>, <tag=value>, <tag/>, <tag=value/>. Self-closing is purely syntax-driven via />.

Derived Types(1)

Types that inherit from TagParseRule.

public string TagName{ get }
public string SourceToken{ get }
public string Identity{ get }
public string MarkupTriggers{ get }
public string TypingTriggers{ get }
protected bool IsVoid{ get }

When, the tag has HTML void-element semantics: every <tag> or <tag=value> form is treated as self-closing (produces a single  placeholder), and a stray </tag> is silently consumed. Use for inline-media tags (obj, sprite) where range semantics don't apply.

public bool CanWrap{ get }
public string SelfClosing()

The self-closing occurrence of this tag (object inserts): <tag/> or <tag=param/>; null when the rule has no tag name.

public override void Reset()
public override string Apply()

Void tags have no wrapping form (return null); otherwise wraps content in the open/close tag pair.

public override void Finalize()
public override int TryMatch()

See Also