You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Why?
Fix REXML::Formatters::Pretty#write_document, which implicitly assumes that the XML file ends with a newline.
If the XML file does not end with a newline, a space is added to the end of the first line.
```
Failure: test_indent(REXMLTests::TestDocument::WriteTest::ArgumentsTest)
/Users/naitoh/ghq/github.com/naitoh/rexml/test/test_document.rb:270:in `test_indent'
267: output = ""
268: indent = 2
269: @document.write(output, indent)
=> 270: assert_equal(<<-EOX.chomp, output)
271: <?xml version='1.0' encoding='UTF-8'?>
272: <message>
273: Hello world!
<"<?xml version='1.0' encoding='UTF-8'?>\n" +
"<message>\n" +
" Hello world!\n" +
"</message>"> expected but was
<"<?xml version='1.0' encoding='UTF-8'?> \n" +
"<message>\n" +
" Hello world!\n" +
"</message>">
diff:
? <?xml version='1.0' encoding='UTF-8'?>
<message>
Hello world!
</message>
```
0 commit comments