Fix inline of links with empty link. (fixes #308)

This commit is contained in:
Álvaro Mondéjar 2020-08-26 07:30:45 +02:00 committed by David Anson
parent 2af3dd0d7a
commit 6dc20fcc21
2 changed files with 18 additions and 0 deletions

View file

@ -31,6 +31,7 @@ module.exports = {
addErrorContext(onError, child.lineNumber,
"[" + linkText + "]()", null, null,
rangeFromRegExp(child.line, emptyLinkRe));
emptyLink = false;
}
} else if (inLink) {
linkText += child.content;

View file

@ -61,3 +61,20 @@
[text]
[text]: link
## Inline of links with empty link (#308)
[text](link-1)
[text]() {MD042}
[text](link-3)
[text](link-1)
[text]() {MD042}
[text](link-3)
[text]() {MD042}
[text](link-1)
[text]() {MD042}
[text](link-3)
[text]() {MD042}
[text](link-5)