Closed Crozzers closed 1 year ago
What's the side effect here, does a block of text we'd normally be hashing get skipped? Haven't dove into this yet, apologies.
In theory, no. A match is only rejected when it starts or ends within an internal hash, so unless the user is exploiting the internal hashing mechanism and intentionally matching the hashes, it shouldn't break anything.
Just in case, I could add some arguments for the link patterns extra so that users can turn this behaviour off
Guess i'm just confused how people are reporting collisions in the first place. I honestly haven't spent much time looking at it yet, so I should dive in before I keep asking questions lol
Thank you
Awesome
This PR fixes #287 by preventing any link pattern regular expressions from matching against internal hashes.
It does this by checking the overlap between any link pattern match and the positions of the hashes in the text. If a link pattern matches against text inside the start-end positions of an internal hash, it is ignored.