Fix detection of span and div elements without attributes.

- Fix: Better detection of <span> and <div> elements that do not have attributes.
This commit is contained in:
Daniel Kraus
2017-09-05 08:58:04 +02:00
parent 3382336a45
commit a78a782f04
3 changed files with 19 additions and 2 deletions

View File

@ -86,6 +86,18 @@ class SplitterTest extends MediaWikiTestCase {
"With parseHeadings = false,\n==a heading may not be linked==",
[ "With parseHeadings = false,\n", "==a heading may not be linked==", '' ]
],
[
true, // skipTemplates
true, // parseHeadings
"With parseHeadings = true,\n==<span>a heading with spans may be linked</span>==\n",
[ "With parseHeadings = true,\n==", "<span>", "a heading with spans may be linked", "</span>", "==\n" ]
],
[
true, // skipTemplates
true, // parseHeadings
"With parseHeadings = true,\n==<div>a heading with divs may be linked</div>==\n",
[ "With parseHeadings = true,\n==", "<div>", "a heading with divs may be linked", "</div>", "==\n" ]
],
// Improperly formatted headings cannot be dealt with appropriately for now
// [
// true, // skipTemplates