Username at-matching fails when substring is also a usermatch and is tagged first
Talk Bug Collectors
Join LibraryThing to post.
This topic is currently marked as "dormant"—the last message is more than 90 days old. You can revive it by posting a reply.
1lorax
First noticed in this post, where brightcopy at-tagged both his own username and that of his test account, brightcopytest; both of them just linked to brightcopy. (Like this: @brightcopy @brightcopytest )
See fairly extensive testing here:
http://www.librarything.com/topic/162369
From what I can tell, if:
1. A leading substring of the tagged username is also a valid username, AND
2. That username has already been tagged in the same post
Then the @ tag will just resolve to the substring-username. This has to have been put in deliberately, and was most likely done to deal with things like punctuation. But slapping in a word-boundary requirement on the match doesn't seem too hard. (Nor, admittedly, is this anything like a high priority, since it's decidedly a corner case.
See fairly extensive testing here:
http://www.librarything.com/topic/162369
From what I can tell, if:
1. A leading substring of the tagged username is also a valid username, AND
2. That username has already been tagged in the same post
Then the @ tag will just resolve to the substring-username. This has to have been put in deliberately, and was most likely done to deal with things like punctuation. But slapping in a word-boundary requirement on the match doesn't seem too hard. (Nor, admittedly, is this anything like a high priority, since it's decidedly a corner case.
2Keeline
It is as if the first and shortest match that can be made is taken. This is the opposite of regular expression matching where the default is for it to be "greedy" and make the largest match possible unless modifying characters are used to alter this behavior.
If the list of potential matches was taken in reverse alphabetical order or from longest to shortest, the result might be different.
James
If the list of potential matches was taken in reverse alphabetical order or from longest to shortest, the result might be different.
James
3lorax
2>
Yes, but only if that shortest match is also tagged earlier in the same post. It's not just blind substring matching, it's deliberate logic.
Yes, but only if that shortest match is also tagged earlier in the same post. It's not just blind substring matching, it's deliberate logic.
4Keeline
It does sound as if something not quite right is in this code if that is how it is handled.
James
James

