Fix and optimize auto_link() URL helper function.

Signed-off-by: Eric Roberts <eric@cryode.com>
Remove whitespace from empty lines.

Signed-off-by: Eric Roberts <eric@cryode.com>
Adjust regex.
Merge pull request #2164 from cryode/bug/auto_link

Fix and optimize auto_link() URL helper function.