\r is converted into \n
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 182
- Forks
- 99
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 8
Description
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>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported IRB reproduction with REXML::Document.new and checking doc.root.text. Trace the parsing path for the XML text containing \r, then verify that the resulting text preserves \r rather than returning \n. The issue provides no target file or test name, so locating the relevant parser code is part of the work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100