Check for dup refs in renumber script

This commit is contained in:
David Eisinger
2023-07-06 22:05:20 -04:00
parent 959728dfc6
commit 4ec2624f44

View File

@@ -9,6 +9,13 @@ end
content = File.read(filename)
refs = content.scan(/\[\d+\]:/)
unless refs == refs.uniq
warn "Error: duplicate refs detected"
exit
end
links = content.scan(/\[\d+\]/).uniq
links.zip(1..).each do |old_id, new_id|