Some weeks ago, on it.wiki, I added the following regex to the AWB typo list:
This was intended to remove dots following km and kg, checking for a lowercase letter to avoid false positives. The regex was tested on various regex testers and it worked perfectly. Then, another user tested it with AWB and no dot correction was made, as you can see: https://it.wikipedia.org/w/index.php?title=Utente:Pracchia-78/AWB/Collaudi&diff=prev&oldid=90249441
So I tried to debug the regex and determined that this wasn't due to a conflict with another typo regex. I also tested it on my own and it worked as expected: https://it.wikipedia.org/w/index.php?title=Utente:Daimona_Eaytoy/Sandbox&diff=90681324&oldid=90681227
I finally figured out that if the regex matches a wikilink like [[A 30 milioni di km. dalla Terra]] in the page, it won't make any dot correction, regardless of the position of the link itself, while other typos are still corrected as expected. But it isn't over: if the above wikilink is reduced to something like [[3 km. d]], no typo is corrected at all.
So, summing up:
- Match "in the middle" of a wikilink ==> Dot correction: NO, Other typos: YES
- Match "in the end" of a wikilink ==> Dot correction: NO, Other typos: NO
- No match within wikilinks ==> Everything is fine
Is this an AWB bug or something else?