Help:Lint errors/unclosed-quotes-in-heading/ja

From mediawiki.org
This page is a translated version of the page Help:Lint errors/unclosed-quotes-in-heading and the translation is 26% complete.
This error is expected to not be very common.

Problem

ウィキテキスト 出力 HTML
__TOC__
テキスト
==''foo==
bar
<div class="toc" id="toc">
..
<ul><li>..<i>foo</i>..</li></ul>
..
</div>
<i><p>text</p></i>
<h2><i>foo</i></h2>
<i><p>bar</p></i>

As you can tell, the unclosed quotes causes the ‎<i>-tag to leak onto the rest of the page from that point on. Moreover, the unclosed tag is added as is to the TOC and then leaks from that point on to the rest of the page which causes the page to look broken.

解決策

Close unclosed double and triple quotes in headings.

Why does this happen?

This is the same reason as in the Help:Extension:Linter/pwrap-bug-workaround case and the Help:Extension:Linter/multiline-html-table-in-list cases. The PHP parser does not have enough information to recognize HTML5 structures. It parses wikitext mostly line-by-line and can misnest HTML tags and relies on RemexHTML to fix it. In these cases, it generates HTML of the form ..<ul><li>..<i>foo</li></ul>..<h2><i>foo</h2></i>. Notice the unclosed ‎<i> tag in the TOC and the misnested ‎<i> tag in the heading.

ツール

The following tools can help fix unclosed quotes in heading: