summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-22 20:10:47 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-22 20:11:26 -0800
commitb142a396090798ed06e89475dcf6fd77362e312f (patch)
treeb91030c45c4dce88f427c87882fb265c39273e16 /js
parent694a826bf0caef60330e3f4fcd195611a70ec77e (diff)
Fixed #214 C and JS implementations.
They were gobbling whitespace after shortcut reference links, e.g. [foo] bar [foo]: url Closes #214.
Diffstat (limited to 'js')
-rw-r--r--js/lib/inlines.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/lib/inlines.js b/js/lib/inlines.js
index 1f4d194..96e8753 100644
--- a/js/lib/inlines.js
+++ b/js/lib/inlines.js
@@ -575,6 +575,10 @@ var parseCloseBracket = function(inlines) {
} else {
reflabel = this.subject.slice(beforelabel, beforelabel + n);
}
+ if (n === 0) {
+ // If shortcut reference link, rewind before spaces we skipped.
+ this.pos = savepos;
+ }
// lookup rawlabel in refmap
var link = this.refmap[normalizeReference(reflabel)];