Help:Extension:Linter/missing-end-tag

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Help:Extension:Linter/missing-end-tag and the translation is 45% complete.

Other languages:
English • ‎dansk • ‎polski • ‎українська • ‎日本語

The missing-end-tag error is when a <tag> is opened, but not closed. To fix it, close the opened tag.

例 1:

<span> rabbits

例 2:

<span>Foo

baz
</span>

例 3:

<span>foo
<p>bar</p>
boo
</span>

In example 1, the span needs to be closed.

<span> rabbits</span>

Examples 2 and 3 not only causes the missing end linter warning but also the stripped tag warning. Solutions for 2 and 3 depend on the exact required output. The simplest is to change the <span> into a <div>.

ツール

The following tools can help fix missing end tags: