# File lib/html/htmlparser.rb, line 164 164: def parse_comment(i) 165: rawdata = @rawdata 166: if rawdata[i, 4] != '<!--' 167: raise RuntimeError, 'unexpected call to handle_comment' 168: end 169: match = rawdata.index(Commentclose, i) 170: return nil unless match 171: matched_length = $&.length 172: j = match 173: handle_comment(rawdata[i+4..(j-1)]) 174: j = match + matched_length 175: return j-i 176: end