diff --git a/rules/list-item.js b/rules/list-item.js index 5a5300a..c47c58d 100644 --- a/rules/list-item.js +++ b/rules/list-item.js @@ -54,7 +54,7 @@ module.exports = rule('remark-lint:awesome-list-item', (ast, file) => { const toc = find(ast, node => ( node.type === 'heading' && node.depth === 2 && - toString(node) === 'Contents' + toString(node).replace(//g, '').trim() === 'Contents' )); if (toc) { diff --git a/rules/toc.js b/rules/toc.js index 5c8b9cc..0f76da1 100644 --- a/rules/toc.js +++ b/rules/toc.js @@ -26,7 +26,7 @@ module.exports = rule('remark-lint:awesome-toc', (ast, file) => { const toc = find(ast, node => ( node.type === 'heading' && node.depth === 2 && - toString(node).trim() === 'Contents' + toString(node).replace(//g, '').trim() === 'Contents' )); if (!toc) {