Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v4.1.8) is shown here.
consume_quoted_regions()
private
Skips over quoted strings, so that less-than and greater-than characters
within the strings are ignored.
Show source
def consume_quoted_regions
text = ""
loop do
match = @scanner.scan_until(/['"<>]/) or break
delim = @scanner.matched
if delim == "<"
match = match.chop
@scanner.pos -= 1
end
text << match
break if delim == "<" || delim == ">"
while match = @scanner.scan_until(/[\\#{delim}]/)
text << match
break if @scanner.matched == delim
break if @scanner.eos?
text << @scanner.getch
end
end
text
end