MarkupOptionstype

{
	readonly rules?: MarkupRules | undefined;
	readonly rel?: string | undefined;
	readonly url?: ImmutableURL | undefined;
	readonly root?: ImmutableURL | undefined;
	readonly schemes?: URISchemes | undefined;
	readonly context?: string;
}
PropertyType
.rulesMarkupRules
The active list of parsing rules. Defaults to MARKUP_RULES readonly
.relstring
Set the rel="" property used for any links (e.g. rel="nofollow ugc"). readonly
.urlImmutableURL
Current page URL — used as the base for resolving relative refs (./foo, #x, bare segments) in link hrefs. readonly
.rootImmutableURL
Site root URL — used as the base for resolving site-absolute path hrefs (/foo), honoring its subfolder. readonly
.schemesURISchemes
Valid URI schemes/protocols for URLs and URIs. Defaults to ["http:", "https:"] readonly
.contextstring
Default context to use if one isn't set. Defaults to "block" readonly
Type
MarkupRules
An immutable list of MarkupRule instances applied by a MarkupParser.
ImmutableURL
Object that describes a valid URL, e.g. example.com/path/to/resource
URISchemes
List of allowed URI schemes.

Options configuring a MarkupParser (represents the current state of the parsing).

  • Every field is optional — an empty object yields a parser with the default rules and behaviour.
  • Link resolution honours url, root, and schemes; link safety hinges on schemes.