diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2014-11-22 20:10:47 -0800 | 
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2014-11-22 20:11:26 -0800 | 
| commit | b142a396090798ed06e89475dcf6fd77362e312f (patch) | |
| tree | b91030c45c4dce88f427c87882fb265c39273e16 /js | |
| parent | 694a826bf0caef60330e3f4fcd195611a70ec77e (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.js | 4 | 
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)];  | 
