Move out linkifyText, fix some bugs, and add unit tests.

Review Request #4097 — Created May 2, 2013 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

Move out linkifyText, fix some bugs, and add unit tests.

This puts linkifyText into the RB namespace and into linkifyUtils.
There's now unit tests for all the important bits, and that'll set us up
for any future unit tests.

There are also some fixes to the /r/123/ links. Previously, a trailing
slash would be left off of the link, and encasing the link in <> (or
parens, or other things) would cause broken links. Now they're all
handled.
Unit tests pass.

Tested along with the upcoming change to switch over entirely to this function.
Didn't see any problems in my usage of links or issue numbers.