aboutsummaryrefslogtreecommitdiff
path: root/js/lib/inlines.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/inlines.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)];