Closed ccaviness closed 8 years ago
Hm, good point, although I don't think that width = 9999
is a valid solution… instead we should use Float::INFINITY
Thanks for reporting!
… and a bugfix release is out
Much nicer solution, and with tests! Thanks.
The
rexml
pretty
formatter will break up and indent long strings, changing the actual content of the string.This means when reading the generated plist, you don't get the same data out.
With a 30-character string:
With a 90-character string:
In the 90-character example, the string value has been changed, and now starts with a newline and two spaces.
The
rexml
pretty
formatter has awidth
attribute: http://ruby-doc.org/stdlib-2.1.0/libdoc/rexml/rdoc/REXML/Formatters/Pretty.htmlAdding:
f.width = 9999
following https://github.com/ckruse/CFPropertyList/blob/master/lib/cfpropertylist/rbREXMLParser.rb#L42 works around this problem.nokogiri
's formatter doesn't do this. I did not testlibxml
.