invalid gallery - bhsd-harry/wikiparser-node GitHub Wiki

invalid-gallery

❌ By default, this rule reports invalid files or image parameters, including those in <gallery> tags, as errors.

Examples

Examples of incorrect code for { "invalid-gallery": 2 }:

<gallery>Foo.jpg|thumb</gallery>

Examples of correct code for { "invalid-gallery": 2 }:

[[File:{{{1}}}]]

Options

extension

This option can be configured to specify the severity of missing file extensions.

Examples of incorrect code for { "invalid-gallery": [ 0, { "extension": 2 } ] }:

[[File:Foo]]
<gallery>Foo</gallery>

image

This option can be configured to specify the severity of invalid images in <gallery> tags.

Examples of incorrect code for { "invalid-gallery": [ 0, { "image": 2 } ] }:

<gallery>Help:Foo</gallery>

Examples of correct code for { "invalid-gallery": [ 2, { "image": 0 } ] }:

<gallery>Help:Foo</gallery>

parameter

⚠️ By default, this rule reports invalid image parameters as warnings. This can be configured by providing a parameter option with a severity value.

Examples of incorrect code for { "invalid-gallery": [ 0, { "parameter": 2 } ] }:

<gallery>
Foo.jpg|100px
</gallery>
[[File:Foo.jpg|frame|100px]]
[[File:Foo.jpg|100pxpx]]

Examples of correct code for { "invalid-gallery": [ 2, { "parameter": 0 } ] }:

<gallery>
Foo.jpg|100px
</gallery>
[[File:Foo.jpg|frame|100px]]
[[File:Foo.jpg|100pxpx]]
⚠️ **GitHub.com Fallback** ⚠️