Add support for disabling/enabling rules within Markdown content (fixes #5).

This commit is contained in:
David Anson 2015-09-26 16:55:33 -07:00
parent 071bba88fc
commit 31141cc3ed
10 changed files with 192 additions and 42 deletions

View file

@ -640,12 +640,13 @@ module.exports = [
"desc": "Inline HTML",
"tags": [ "html" ],
"func": function MD033(params, errors) {
filterTokens(params, "html_block", function forToken(token) {
errors.push(token.lineNumber);
});
forEachInlineChild(params, "html_inline", function forToken(token) {
errors.push(token.lineNumber);
});
function forToken(token) {
if (token.content.search(shared.inlineCommentRe) === -1) {
errors.push(token.lineNumber);
}
}
filterTokens(params, "html_block", forToken);
forEachInlineChild(params, "html_inline", forToken);
}
},