From: Roan Kattouw Date: Thu, 24 Dec 2009 19:33:01 +0000 (+0000) Subject: API: (bug 21945) Add chomp control in YAML X-Git-Tag: 1.31.0-rc.0~38481 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/fiche.php?a=commitdiff_plain;h=2569c9ead01b215ecdaf32174001a1081c07a1e9;p=lhc%2Fweb%2Fwiklou.git API: (bug 21945) Add chomp control in YAML --- 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; }