mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30:12 +01:00
Fix inline of links with empty link. (fixes #308)
This commit is contained in:
parent
2af3dd0d7a
commit
6dc20fcc21
2 changed files with 18 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ module.exports = {
|
||||||
addErrorContext(onError, child.lineNumber,
|
addErrorContext(onError, child.lineNumber,
|
||||||
"[" + linkText + "]()", null, null,
|
"[" + linkText + "]()", null, null,
|
||||||
rangeFromRegExp(child.line, emptyLinkRe));
|
rangeFromRegExp(child.line, emptyLinkRe));
|
||||||
|
emptyLink = false;
|
||||||
}
|
}
|
||||||
} else if (inLink) {
|
} else if (inLink) {
|
||||||
linkText += child.content;
|
linkText += child.content;
|
||||||
|
|
|
||||||
|
|
@ -61,3 +61,20 @@
|
||||||
[text]
|
[text]
|
||||||
|
|
||||||
[text]: link
|
[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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue