G
Gerard A.W. Vreeswijk
Hi there,
I try YAML to fold newlines. Sometimes it does, sometimes it doesn't.
What's happening here? Thanks.
require 'yaml'
text = "Just got my (dead-tree, printed-on-paper, I don't know if there's a web " +
"version) copy of Linux Magazine for September, 2002. There's an article by " +
"Dave Thomas about building networked applications in Ruby. Props to Dave!"
hash = { 'key' => text }
puts text.to_yaml( :UseFold => true,
:BestWidth => 15 )
produces:
--- >-
Just got my
(dead-tree,
printed-on-pap
r, I don't know
if there's a
web version)
copy of Linux
Magazine for
September,
2002. There's
an article by
Dave Thomas
about building
networked
applications in
Ruby. Props to
Dave!
puts hash.to_yaml( :UseFold => true,
:BestWidth => 15 )
produces:
I try YAML to fold newlines. Sometimes it does, sometimes it doesn't.
What's happening here? Thanks.
require 'yaml'
text = "Just got my (dead-tree, printed-on-paper, I don't know if there's a web " +
"version) copy of Linux Magazine for September, 2002. There's an article by " +
"Dave Thomas about building networked applications in Ruby. Props to Dave!"
hash = { 'key' => text }
puts text.to_yaml( :UseFold => true,
:BestWidth => 15 )
produces:
--- >-
Just got my
(dead-tree,
printed-on-pap
r, I don't know
if there's a
web version)
copy of Linux
Magazine for
September,
2002. There's
an article by
Dave Thomas
about building
networked
applications in
Ruby. Props to
Dave!
puts hash.to_yaml( :UseFold => true,
:BestWidth => 15 )
produces: