X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcontent%2FJsonContent.php;h=2b94f3f71e057c85e4b2d4ba3ff4426a436e339c;hb=21a34a42f46f46ba357d621ec0448d3e9010296d;hp=40d9277470f82b3385ce43cd32bab5d2c4ef60f4;hpb=47ad7f2a431214657e2f38f31b506b81adb863f0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/content/JsonContent.php b/includes/content/JsonContent.php index 40d9277470..2b94f3f71e 100644 --- a/includes/content/JsonContent.php +++ b/includes/content/JsonContent.php @@ -22,6 +22,7 @@ class JsonContent extends TextContent { /** * @param string $text JSON + * @param string $modelId */ public function __construct( $text, $modelId = CONTENT_MODEL_JSON ) { parent::__construct( $text, $modelId ); @@ -86,7 +87,7 @@ class JsonContent extends TextContent { return $this; } - return new static( $this->beautifyJSON() ); + return new static( self::normalizeLineEndings( $this->beautifyJSON() ) ); } /** @@ -96,7 +97,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