Skip to content

Commit 5561522

Browse files
tompngCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 441de5d commit 5561522

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/rdoc/markup/formatter.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ def apply_regexp_handling(text)
9393
matched << [m.begin(idx), m.end(idx), m[idx], name, priority]
9494
end
9595
end
96-
# If the start positions are the same, prefer the one with higher priority (registered earlier one)
96+
# If the start positions are the same, prefer the earlier-registered one
97+
# (lower numeric priority from each_with_index).
9798
matched.sort_by! {|beg_pos, _, _, _, priority| [beg_pos, priority] }
9899

99100
pos = 0

0 commit comments

Comments
 (0)