Comment 3 for bug 1559635

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

There are a number of corner cases that become very hard to handle. The period '.' and the closing parentheses ')' are hard to deal with. Is it the last character of the URL, or a terminator? (no pun intended :-) I can't think of a valid way to determine for a period. I would say that it is very rare for a period to be the last char of a URL, and much more common for it to be the end of sentence.

For the parentheses I think it may be possible to do a look-behind test. i.e. if the entire URL begins with an opening parentheses, then it makes sense the last closing one is not part of the URL. If the last part of the URL (typically a filename) contains an opening parentheses it makes sense that the last one is closing it. I'm not a genius when it comes to regex's, so I think someone with deep skills would need to come up with a viable parser for that.

I really don't like the idea of multiple bindings to select between treatments. Off the top of my head it would also be a evil thing to implement.