X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fcontent%2FJsonContent.php;h=2f4554731e9930c1b83a609fce1790e33fd8a6d6;hb=a9007e8baf802f0f57d095e3bb4ad201c98c0cb3;hp=b9215fce8535b8f8f2e42555d94540cb225f8cae;hpb=3071f1fad720f1773864621158a0c59b73124896;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/content/JsonContent.php b/includes/content/JsonContent.php index b9215fce85..2f4554731e 100644 --- a/includes/content/JsonContent.php +++ b/includes/content/JsonContent.php @@ -86,7 +86,7 @@ class JsonContent extends TextContent { return $this; } - return new static( $this->beautifyJSON() ); + return new static( self::normalizeLineEndings( $this->beautifyJSON() ) ); } /** @@ -96,7 +96,7 @@ class JsonContent extends TextContent { * @param int $revId * @param ParserOptions $options * @param bool $generateHtml - * @param ParserOutput $output + * @param ParserOutput &$output */ protected function fillParserOutput( Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output @@ -161,7 +161,7 @@ class JsonContent extends TextContent { ); } return Html::rawElement( 'table', [ 'class' => 'mw-json' ], - Html::rawElement( 'tbody', [], join( '', $rows ) ) + Html::rawElement( 'tbody', [], implode( '', $rows ) ) ); } @@ -200,7 +200,7 @@ class JsonContent extends TextContent { ); } return Html::rawElement( 'table', [ 'class' => 'mw-json' ], - Html::rawElement( 'tbody', [], join( "\n", $rows ) ) + Html::rawElement( 'tbody', [], implode( "\n", $rows ) ) ); }