Closed
Description
Hello Ruby/REXML developers,
The implementation can be found here:
The current code is as follows:
# UNTESTED
def Functions::normalize_space( string=nil )
string = string(@@context[:node]) if string.nil?
if string.kind_of? Array
string.collect{|x| string.to_s.strip.gsub(/\s+/um, ' ') if string}
else
string.to_s.strip.gsub(/\s+/um, ' ')
end
end
It appears there may be a typo in the use of x
versus string
within the collect
block. I believe the following adjustment might be more in line with the intended functionality:
string.collect{|x| x.to_s.strip.gsub(/\s+/um, ' ') if x}
I might be misunderstanding the intention here, so if I've overlooked something, please do let me know.
Thank you for your time.
Metadata
Metadata
Assignees
Labels
No labels