API: (bug 21945) Add chomp control in YAML
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 24 Dec 2009 19:33:01 +0000 (19:33 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 24 Dec 2009 19:33:01 +0000 (19:33 +0000)
RELEASE-NOTES
includes/api/ApiFormatYaml_spyc.php

index 04db739..97531c5 100644 (file)
@@ -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 ===
 
index e339534..6944696 100644 (file)
@@ -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;
        }