diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2014-09-06 22:43:18 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2014-09-06 22:43:18 -0700 |
commit | 1f43f5936bb856d317686641a46388030acd8566 (patch) | |
tree | aadc4977cd8f76439866eb6cb6bb6660d7776c19 | |
parent | b0fa8e0aa806e61a93649d9245f63e84b4c41a1d (diff) |
Added anchor to linkDestination regexes.
Closes #62.
-rwxr-xr-x | js/stmd.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -54,10 +54,10 @@ var reLinkTitle = new RegExp( '\\((' + ESCAPED_CHAR + '|[^)\\x00])*\\))'); var reLinkDestinationBraces = new RegExp( - '[<](?:[^<>\\n\\\\\\x00]' + '|' + ESCAPED_CHAR + '|' + '\\\\)*[>]'); + '^(?:[<](?:[^<>\\n\\\\\\x00]' + '|' + ESCAPED_CHAR + '|' + '\\\\)*[>])'); var reLinkDestination = new RegExp( - '(?:' + REG_CHAR + '+|' + ESCAPED_CHAR + '|' + IN_PARENS_NOSP + ')*'); + '^(?:' + REG_CHAR + '+|' + ESCAPED_CHAR + '|' + IN_PARENS_NOSP + ')*'); var reEscapable = new RegExp(ESCAPABLE); |