mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-01-26 17:06:10 +01:00
Add lint rules from eslint-plugin-unicorn.
This commit is contained in:
parent
0f4745efe3
commit
5ab938a6ab
11 changed files with 96 additions and 31 deletions
|
|
@ -196,7 +196,8 @@
|
|||
if (hashPrefix === decodedHash.substring(0, hashPrefix.length)) {
|
||||
markdown.value = decodedHash.substring(hashPrefix.length);
|
||||
}
|
||||
} catch (ex) {
|
||||
/* eslint-disable-next-line unicorn/prefer-optional-catch-binding */
|
||||
} catch (error) {
|
||||
// Invalid
|
||||
}
|
||||
}
|
||||
|
|
@ -205,7 +206,8 @@
|
|||
try {
|
||||
/* eslint-disable-next-line no-new */
|
||||
new URL(rulesMd);
|
||||
} catch (ex) {
|
||||
/* eslint-disable-next-line unicorn/prefer-optional-catch-binding */
|
||||
} catch (error) {
|
||||
markdown.value = [
|
||||
"# Sorry",
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -2782,10 +2782,10 @@ module.exports = {
|
|||
// Close current run
|
||||
var content = line.substring(emphasisIndex, matchIndex);
|
||||
if (!emphasisLength) {
|
||||
content = content.trimStart();
|
||||
content = content.trimLeft();
|
||||
}
|
||||
if (!match) {
|
||||
content = content.trimEnd();
|
||||
content = content.trimRight();
|
||||
}
|
||||
var leftSpace = leftSpaceRe.test(content);
|
||||
var rightSpace = rightSpaceRe.test(content);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue