Gerrit Patch Uploader has uploaded a new change for review.
https://gerrit.wikimedia.org/r/90696
Change subject: Have list items occupy their own line
......................................................................
Have list items occupy their own line
Ensures that HTML list items are on their own line, which fixes a
CSS issue with .hlist; it depends on a breakable character between
list items, and a newline does provide one. Should also unburden
HTML Tidy, as output now matched that of Tidy.
Bug: 39617
Change-Id: I82fb4d749a200cfc049b30d2ee6e96a5ff7574e2
---
M includes/parser/Parser.php
1 file changed, 11 insertions(+), 11 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/96/90696/1
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 221a630..7e939ee 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -2281,13 +2281,13 @@
$result = $this->closeParagraph();
if ( '*' === $char ) {
- $result .= '<ul><li>';
+ $result .= "<ul>\n<li>";
} elseif ( '#' === $char ) {
- $result .= '<ol><li>';
+ $result .= "<ol>\n<li>";
} elseif ( ':' === $char ) {
- $result .= '<dl><dd>';
+ $result .= "<dl>\n<dd>";
} elseif ( ';' === $char ) {
- $result .= '<dl><dt>';
+ $result .= "<dl>\n<dt>";
$this->mDTopen = true;
} else {
$result = '<!-- ERR 1 -->';
@@ -2305,11 +2305,11 @@
*/
function nextItem( $char ) {
if ( '*' === $char || '#' === $char ) {
- return '</li><li>';
+ return "</li>\n<li>";
} elseif ( ':' === $char || ';' === $char ) {
- $close = '</dd>';
+ $close = "</dd>\n";
if ( $this->mDTopen ) {
- $close = '</dt>';
+ $close = "</dt>\n";
}
if ( ';' === $char ) {
$this->mDTopen = true;
@@ -2331,15 +2331,15 @@
*/
function closeList( $char ) {
if ( '*' === $char ) {
- $text = '</li></ul>';
+ $text = "</li>\n</ul>";
} elseif ( '#' === $char ) {
- $text = '</li></ol>';
+ $text = "</li>\n</ol>";
} elseif ( ':' === $char ) {
if ( $this->mDTopen ) {
$this->mDTopen = false;
- $text = '</dt></dl>';
+ $text = "</dt>\n</dl>";
} else {
- $text = '</dd></dl>';
+ $text = "</dd>\n</dl>";
}
} else {
return '<!-- ERR 3 -->';
--
To view, visit https://gerrit.wikimedia.org/r/90696
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I82fb4d749a200cfc049b30d2ee6e96a5ff7574e2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Edokter <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits