Skip to content

Commit dc8d4b0

Browse files
committed
Split out the 3 match types (email, twitter, and url) into separate classes, in preparation to pass them to the replaceFn
Also add utility methods.
1 parent 03ac9af commit dc8d4b0

File tree

11 files changed

+937
-204
lines changed

11 files changed

+937
-204
lines changed

Gruntfile.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,17 @@ module.exports = function(grunt) {
4343
return '\t' + src.replace( /\n/g, '\n\t' ); // indent each source file, which is placed inside the UMD block
4444
}
4545
},
46-
src: [ 'src/umdBegin.js', 'src/Autolinker.js', 'src/AnchorTagBuilder.js', 'src/umdEnd.js' ],
46+
src: [
47+
'src/umdBegin.js',
48+
'src/Autolinker.js',
49+
'src/Util.js',
50+
'src/AnchorTagBuilder.js',
51+
'src/Match.js',
52+
'src/EmailMatch.js',
53+
'src/TwitterMatch.js',
54+
'src/UrlMatch.js',
55+
'src/umdEnd.js'
56+
],
4757
dest: 'dist/Autolinker.js',
4858
},
4959
},

dist/Autolinker.js

Lines changed: 460 additions & 101 deletions
Large diffs are not rendered by default.

dist/Autolinker.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/AnchorTagBuilder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Autolinker.AnchorTagBuilder.prototype = {
156156

157157

158158
/**
159-
* Removes any trailing slash from the given `anchorText`, in prepration for the text to be displayed.
159+
* Removes any trailing slash from the given `anchorText`, in preparation for the text to be displayed.
160160
*
161161
* @private
162162
* @param {String} anchorText The text of the anchor that is being generated, for which to remove any trailing

0 commit comments

Comments
 (0)