X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fcontent%2FJsonContent.php;h=2b94f3f71e057c85e4b2d4ba3ff4426a436e339c;hb=3df3b575c6617df64ec98533cc7141bd2314e274;hp=40d9277470f82b3385ce43cd32bab5d2c4ef60f4;hpb=42324aff4e173b70aeed4f520ff0f5b96557d24e;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