unmatched tag - bhsd-harry/wikiparser-node GitHub Wiki

unmatched-tag

⚠️ By default, this rule reports unmatched HTML tags as warnings.

Options

both

This option can be configured to specify the severity of HTML tags that are both closing and self-closing.

Examples of incorrect code for { "unmatched-tag": [ 0, { "both": 2 } ] }:

</br>

Examples of correct code for { "unmatched-tag": [ 2, { "both": 0 } ] }:

</br>

closing

This option can be configured to specify the severity of unmatched closing tags.

Examples of incorrect code for { "unmatched-tag": [ 0, { "closing": 2 } ] }:

</p>

Examples of correct code for { "unmatched-tag": [ 2, { "closing": 0 } ] }:

</p>

conditional

This option can be configured to specify the severity of unmatched HTML tags inside conditional statements (#if, #ifeq, #ifexpr, #iferror, #ifexist, or #switch).

Examples of incorrect code for { "unmatched-tag": [ 0, { "conditional": 2 } ] }:

{{#if:|<p>}}

Examples of correct code for { "unmatched-tag": [ 2, { "conditional": 0 } ] }:

{{#if:|<p>}}

opening

This option can be configured to specify the severity of unmatched opening tags.

Examples of incorrect code for { "unmatched-tag": [ 0, { "opening": 2 } ] }:

<p>

Examples of correct code for { "unmatched-tag": [ 2, { "opening": 0 } ] }:

<p>

selfClosing

This option can be configured to specify the severity of invalid self-closing HTML tags.

Examples of incorrect code for { "unmatched-tag": [ 0, { "selfClosing": 2 } ] }:

<p/>

Examples of correct code for { "unmatched-tag": [ 2, { "selfClosing": 0 } ] }:

<p/>
⚠️ **GitHub.com Fallback** ⚠️