Merge "SpecialVersion: Grammar fixes in comments"
[lhc/web/wiklou.git] / includes / Message.php
index 179aca7..826d55b 100644 (file)
@@ -659,10 +659,7 @@ class Message {
                # Maybe transform using the full parser
                if ( $this->format === 'parse' ) {
                        $string = $this->parseText( $string );
-                       $m = array();
-                       if ( preg_match( '/^<p>(.*)\n?<\/p>\n?$/sU', $string, $m ) ) {
-                               $string = $m[1];
-                       }
+                       $string = Parser::stripOuterParagraph( $string );
                } elseif ( $this->format === 'block-parse' ) {
                        $string = $this->parseText( $string );
                } elseif ( $this->format === 'text' ) {
@@ -963,7 +960,7 @@ class Message {
                $out = MessageCache::singleton()->parse(
                        $string,
                        $this->title,
-                        /*linestart*/true,
+                       /*linestart*/true,
                        $this->interface,
                        $this->language
                );