Skip to content

Commit c0efe1f

Browse files
committed
Update README.md for 0.9.3, and build dist/ files.
1 parent 461f7cb commit c0efe1f

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ autolinker.link( "Go to www.google.com" );
148148

149149
## Changelog:
150150

151+
### 0.9.3
152+
153+
- Fixed an issue where Twitter handles wouldn't be autolinked if they existed as the sole entity within parenthesis or brackets
154+
(thanks [@busticated](https://github.com/busticated) for pointing this out and providing unit tests)
155+
151156
### 0.9.2
152157

153158
- Fixed an issue with nested tags within an existing <a> tag, where the nested tags' inner text would be accidentally

dist/Autolinker.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/*!
22
* autolinker
3-
* 0.9.2
3+
* 0.9.3
44
*
55
* Copyright(c) 2014 Gregory Jacobs <greg@greg-jacobs.com>
66
* MIT Licensed. http://www.opensource.org/licenses/mit-license.php
77
*
88
* https://github.com/gregjacobs/Autolinker.js
99
*/
1010
/*global define, module */
11+
/*jshint smarttabs:true */
1112
// Set up Autolinker appropriately for the environment.
1213
( function( root, factory ) {
1314
if( typeof define === 'function' && define.amd ) {
@@ -145,7 +146,7 @@
145146
* This also includes a path, url parameters, or hash anchors. Ex: google.com/path/to/file?q1=1&q2=2#myAnchor
146147
*/
147148
matcherRegex: (function() {
148-
var twitterRegex = /(^|\s)@(\w{1,15})/, // For matching a twitter handle. Ex: @gregory_jacobs
149+
var twitterRegex = /(^|[^\w])@(\w{1,15})/, // For matching a twitter handle. Ex: @gregory_jacobs
149150

150151
emailRegex = /(?:[\-;:&=\+\$,\w\.]+@)/, // something@ for email addresses (a.k.a. local-part)
151152

dist/Autolinker.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "autolinker",
3-
"version": "0.9.2",
3+
"version": "0.9.3",
44
"description": "Simple utility to automatically link the URLs, email addresses, and Twitter handles in a given block of text/HTML",
55
"main": "dist/Autolinker.js",
66
"directories": {

0 commit comments

Comments
 (0)