From 2569c9ead01b215ecdaf32174001a1081c07a1e9 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 24 Dec 2009 19:33:01 +0000 Subject: [PATCH] API: (bug 21945) Add chomp control in YAML --- RELEASE-NOTES | 1 + includes/api/ApiFormatYaml_spyc.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 04db7391cd..97531c5c98 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -757,6 +757,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 21817) list=usercontribs returns empty result for empty ucuser * (bug 21441) meta=userinfo&uiprop=options no longer returns default options for logged-in users under certain circumstances +* (bug 21945) Add chomp control in YAML === Languages updated in 1.16 === diff --git a/includes/api/ApiFormatYaml_spyc.php b/includes/api/ApiFormatYaml_spyc.php index e339534faa..6944696942 100644 --- a/includes/api/ApiFormatYaml_spyc.php +++ b/includes/api/ApiFormatYaml_spyc.php @@ -203,7 +203,7 @@ class Spyc { */ private function _doLiteralBlock($value,$indent) { $exploded = explode("\n",$value); - $newValue = '|'; + $newValue = '|-'; $indent += $this->_dumpIndent; $spaces = str_repeat(' ',$indent); foreach ($exploded as $line) { @@ -227,7 +227,7 @@ class Spyc { $indent += $this->_dumpIndent; $indent = str_repeat(' ',$indent); $wrapped = wordwrap($value,$this->_dumpWordWrap,"\n$indent"); - $value = ">\n".$indent.$wrapped; + $value = ">-\n".$indent.$wrapped; } return $value; } -- 2.20.1