mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Remove remaining use of Array.filter from rules.
This commit is contained in:
parent
17763331a6
commit
2a2371a8cb
1 changed files with 2 additions and 4 deletions
|
|
@ -321,10 +321,8 @@ module.exports = [
|
||||||
[ "code_block", "fence" ].forEach(function forType(type) {
|
[ "code_block", "fence" ].forEach(function forType(type) {
|
||||||
filterTokens(params.tokens, type, function forToken(token) {
|
filterTokens(params.tokens, type, function forToken(token) {
|
||||||
if (token.content && token.content.split(shared.newLineRe)
|
if (token.content && token.content.split(shared.newLineRe)
|
||||||
.filter(function filterLine(line) {
|
.every(function forLine(line) {
|
||||||
return line;
|
return !line || /^\$\s/.test(line);
|
||||||
}).every(function forLine(line) {
|
|
||||||
return /^\$\s/.test(line);
|
|
||||||
})) {
|
})) {
|
||||||
errors.push(token.lineNumber);
|
errors.push(token.lineNumber);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue