reddit/snudown — pull request #22 by ianweller (2011-12-25 03:34:39+00:00)
Title: Autolink /user/[username] to a user profile page

Idea from this post by sifarat: http://www.reddit.com/r/ideasfortheadmins/comments/nml7y/auto_link_user_profile_to_userusername/ The other day I thought that this would be a nice feature to have as well, and that post reminded me that I wanted to hack at it.

I tested this locally by running `python setup.py build` and using the built Python extension, and made sure that subreddit autolinking still worked as well (since I did have to make `md->active_char['/']` handle both use cases).

The statement that usernames accept characters from `[A-Za-z0-9_-]` is based on https://github.com/reddit/reddit/blob/master/r2/r2/controllers/validator/validator.py#L837. Like the subreddit autolinker it doesn't verify that the username satisfies the length requirement.