If a status object returns failure with multiple messages (like in
Content::prepareSave()), then previously the first list item would have
a raw asterisk in front of it instead of being a list item because the
<div> tag was on the same line. Adding a newline before the status
object's wikitext will ensure that the first item is interpreted as part
of the list.
Change-Id: If42b3e745f1bd57c6e7964c8e297dab2bf742d4c
case self::AS_CANNOT_USE_CUSTOM_MODEL:
case self::AS_PARSE_ERROR:
- $wgOut->addWikiText( '<div class="error">' . $status->getWikiText() . '</div>' );
+ $wgOut->addWikiText( '<div class="error">' . "\n" . $status->getWikiText() . '</div>' );
return true;
case self::AS_SUCCESS_NEW_ARTICLE:
// is if an extension hook aborted from inside ArticleSave.
// Render the status object into $this->hookError
// FIXME this sucks, we should just use the Status object throughout
- $this->hookError = '<div class="error">' . $status->getWikiText() .
+ $this->hookError = '<div class="error">' ."\n" . $status->getWikiText() .
'</div>';
return true;
}