Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\r is converted into \n #31

Open
MarcoCostantini opened this issue May 12, 2020 · 0 comments
Open

\r is converted into \n #31

MarcoCostantini opened this issue May 12, 2020 · 0 comments

Comments

@MarcoCostantini
Copy link

MarcoCostantini commented May 12, 2020

In this example, in an XML document, the character \r is converted to \n.
It was instead expected to keep \r

$ gem list |grep rexml
rexml (default: 3.2.3)
$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
$ irb -v
irb 1.2.1 (2019-12-24)
$ irb
irb(main):001:0> require "rexml/document"
=> true
irb(main):002:0> doc = REXML::Document.new "<a>\r</a>"
irb(main):003:0> doc.root.text
=> "\n"
irb(main):004:0>
@MarcoCostantini MarcoCostantini changed the title \r is converted in \n \r is converted into \n May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant