mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Update MD039/no-space-in-links to not remove code/emphasis markers when fixing issues (fixes #482).
This commit is contained in:
parent
a8f946e0b3
commit
7bb80d19b1
6 changed files with 207 additions and 5 deletions
|
|
@ -3967,7 +3967,7 @@ module.exports = {
|
|||
var linkText = "";
|
||||
var lineIndex = 0;
|
||||
children.forEach(function (child) {
|
||||
var content = child.content, type = child.type;
|
||||
var content = child.content, markup = child.markup, type = child.type;
|
||||
if (type === "link_open") {
|
||||
inLink = true;
|
||||
linkText = "";
|
||||
|
|
@ -4000,7 +4000,9 @@ module.exports = {
|
|||
lineIndex = 0;
|
||||
}
|
||||
else if (inLink) {
|
||||
linkText += content;
|
||||
linkText += type.endsWith("_inline") ?
|
||||
"".concat(markup).concat(content).concat(markup) :
|
||||
(content || markup);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue