lonely bracket - bhsd-harry/wikiparser-node GitHub Wiki

lonely-bracket

⚠️ By default, this rule reports plain-text square brackets or curly braces as warnings.

Examples

Examples of correct code for { "lonely-bracket": 2 }:

[Foo]
[http://example.com [F]oo]
[http://example.com [F<nowiki>]</nowiki>oo]

Options

converter

This option can be configured to specify the severity of -{ or }- if language conversion is enabled.

Examples of incorrect code for { "lonely-bracket": [ 0, { "converter": 2 } ] }:

-{
}-

Examples of correct code for { "lonely-bracket": [ 2, { "converter": 0 } ] }:

-{
}-

double

This option can be configured to specify the severity of double square brackets or curly braces.

Examples of incorrect code for { "lonely-bracket": [ 0, { "double": 2 } ] }:

[[
]]
{{
}}
{{{Foo}}
{{Foo}}}

Examples of correct code for { "lonely-bracket": [ 2, { "double": 0 } ] }:

[[
]]
{{
}}
{{{Foo}}
{{Foo}}}

extLink

❌ By default, this rule reports plain-text [ or ] that may be part of a broken external link syntax as errors. This can be configured by providing a extLink option with a severity value.

Examples of incorrect code for { "lonely-bracket": [ 0, { "extLink": 2 } ] }:

[http://example.com Foo
http://example.com Foo]
[Foo https://example.com]

Examples of correct code for { "lonely-bracket": [ 2, { "extLink": 0 } ] }:

[http://example.com Foo
http://example.com Foo]
[Foo https://example.com]

single

This option can be configured to specify the severity of single square brackets or curly braces.

Examples of incorrect code for { "lonely-bracket": [ 0, { "single": 2 } ] }:

[
]
{
}

Examples of correct code for { "lonely-bracket": [ 2, { "single": 0 } ] }:

[
]
{
}
⚠️ **GitHub.com Fallback** ⚠️