string_regex_marker.rb 319 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 module Gitlab class StringRegexMarker < StringRangeMarker def mark(regex, group: 0, &block) ranges = [] raw_line.scan(regex) do begin_index, end_index = Regexp.last_match.offset(group) ranges << (begin_index..(end_index - 1)) end super(ranges, &block) end end end