Skip to content

Commit

Permalink
ALlow empty destinations in link refs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Apr 3, 2019
1 parent 202e712 commit 039020a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/inlines.js
Expand Up @@ -516,6 +516,9 @@ var parseLinkDestination = function() {
this.pos += 1;
}
}
if (this.pos === savepos && c !== C_CLOSE_PAREN) {
return null;
}
res = this.subject.substr(savepos, this.pos - savepos);
return normalizeURI(unescapeString(res));
} else { // chop off surrounding <..>:
Expand Down Expand Up @@ -801,7 +804,7 @@ var parseReference = function(s, refmap) {
this.spnl();

dest = this.parseLinkDestination();
if (dest === null || dest.length === 0) {
if (dest === null) {
this.pos = startpos;
return 0;
}
Expand Down

0 comments on commit 039020a

Please sign in to comment.