Fix issue where escaped trailing hash on header caused MD003 due to incorrect classification.

This commit is contained in:
David Anson 2018-04-28 14:49:31 -07:00
parent f77b7ae4ec
commit 017fe127fa
3 changed files with 26 additions and 3 deletions

View file

@ -108,7 +108,7 @@ module.exports.indentFor = indentFor;
// Returns the heading style for a heading token
module.exports.headingStyleFor = function headingStyleFor(token) {
if ((token.map[1] - token.map[0]) === 1) {
if (/#\s*$/.test(token.line)) {
if (/[^\\]#\s*$/.test(token.line)) {
return "atx_closed";
}
return "atx";