Clarification and motivation
Imagine the following list of links:
[file](files/file.out)
[file2](files/file2.out)
[file3](files/file3.out)
[Another file](files/another-file.out)
[And a file once again](files/and-a-file-once-again.out)
It is easy to make a mistake here during copy-pasting so that text is updated and the link is not. I think we can use some heuristics to spot such mistakes (but avoid false positives at all costs):
- If this check is enabled in config (it should be by default);
- And there are two links
[T1](L1) and [T2](L1) in a file, and T1 is substring of L1 modulo casing and all the non-alphanum characters, while T2 is not substring of L1 modulo the same things;
then report an error at [T2](L1) position, mentioning that it could be a bad copy-paste of [T1](L1). And a similar check for [T1](L2).
Acceptance criteria
- The check is implemented.
- It can be disabled both in config and in place via some
<--! xrefcheck: no duplication check in {file/paragraph/link} -->.
Clarification and motivation
Imagine the following list of links:
[file](files/file.out)[file2](files/file2.out)[file3](files/file3.out)[Another file](files/another-file.out)[And a file once again](files/and-a-file-once-again.out)It is easy to make a mistake here during copy-pasting so that text is updated and the link is not. I think we can use some heuristics to spot such mistakes (but avoid false positives at all costs):
[T1](L1)and[T2](L1)in a file, andT1is substring ofL1modulo casing and all the non-alphanum characters, whileT2is not substring ofL1modulo the same things;then report an error at
[T2](L1)position, mentioning that it could be a bad copy-paste of[T1](L1). And a similar check for[T1](L2).Acceptance criteria
<--! xrefcheck: no duplication check in {file/paragraph/link} -->.