MD014 should not warn for empty blocks.

This commit is contained in:
David Anson 2016-01-04 22:22:35 -08:00
parent fb31bb5f35
commit 26ab9a5596
3 changed files with 23 additions and 2 deletions

View file

@ -342,10 +342,11 @@ module.exports = [
"func": function MD014(params, errors) {
[ "code_block", "fence" ].forEach(function forType(type) {
filterTokens(params, type, function forToken(token) {
var allBlank = true;
if (token.content && token.content.split(shared.newLineRe)
.every(function forLine(line) {
return !line || /^\$\s/.test(line);
})) {
return !line || (allBlank = false) || /^\$\s/.test(line);
}) && !allBlank) {
errors.push(token.lineNumber);
}
});

View file

@ -0,0 +1,6 @@
{
"default": true,
"MD009": {
"br_spaces": 2
}
}

View file

@ -0,0 +1,14 @@
# Header
```js
```
```css
```
```spaces
```