MarkupOptionstype
{
readonly rules?: MarkupRules | undefined;
readonly rel?: string | undefined;
readonly url?: ImmutableURL | undefined;
readonly root?: ImmutableURL | undefined;
readonly schemes?: URISchemes | undefined;
readonly context?: string;
}| Property | Type | |
|---|---|---|
.rules | MarkupRules | The active list of parsing rules. Defaults to MARKUP_RULES readonly |
.rel | string | Set the rel="" property used for any links (e.g. rel="nofollow ugc"). readonly |
.url | ImmutableURL | Current page URL — used as the base for resolving relative refs ( ./foo, #x, bare segments) in link hrefs. readonly |
.root | ImmutableURL | Site root URL — used as the base for resolving site-absolute path hrefs ( /foo), honoring its subfolder. readonly |
.schemes | URISchemes | Valid URI schemes/protocols for URLs and URIs. Defaults to ["http:", "https:"] readonly |
.context | string | 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, andschemes; link safety hinges onschemes.