Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

GenericParseRule

Fields that may be present in both tag and style parse rules.

interface GenericParseRule {
attrs?: Attrs;
closeParent?: boolean;
consuming?: boolean;
context?: string;
ignore?: boolean;
mark?: string;
priority?: number;
skip?: boolean;
}

§Properties

§
attrs?: Attrs
[src]

Attributes for the node or mark created by this rule. When getAttrs is provided, it takes precedence.

§
closeParent?: boolean
[src]

When true, finding an element that matches this rule will close the current node.

§
consuming?: boolean
[src]

By default, when a rule matches an element or style, no further rules get a chance to match it. By setting this to false, you indicate that even when this rule matches, other rules that come after it should also run.

§
context?: string
[src]

When given, restricts this rule to only match when the current context—the parent nodes into which the content is being parsed—matches this expression. Should contain one or more node names or node group names followed by single or double slashes. For example "paragraph/" means the rule only matches when the parent node is a paragraph, "blockquote/paragraph/" restricts it to be in a paragraph that is inside a blockquote, and "section//" matches any position inside a section—a double slash matches any sequence of ancestor nodes. To allow multiple different contexts, they can be separated by a pipe (|) character, as in "blockquote/|list_item/".

§
ignore?: boolean
[src]

When true, ignore content that matches this rule.

§
mark?: string
[src]

The name of the mark type to wrap the matched content in.

§
priority?: number
[src]

Can be used to change the order in which the parse rules in a schema are tried. Those with higher priority come first. Rules without a priority are counted as having priority 50. This property is only meaningful in a schema—when directly constructing a parser, the order of the rule array is used.