Skip to content

Commit e5a55ef

Browse files
authored
fix: allow remark-lint-expected-html-sections to skip yaml
PR-URL: #11055 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 2de635b commit e5a55ef

File tree

1 file changed

+3
-0
lines changed
  • lib/node_modules/@stdlib/_tools/remark/plugins/remark-lint-expected-html-sections/lib

1 file changed

+3
-0
lines changed

lib/node_modules/@stdlib/_tools/remark/plugins/remark-lint-expected-html-sections/lib/linter.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ function getAnchorNode( tree ) {
4848

4949
for ( i = 0; i < tree.children.length; i++ ) {
5050
node = tree.children[ i ];
51+
if ( node.type === 'yaml' ) {
52+
continue;
53+
}
5154
if ( node.type === 'html' && RE_HTML_COMMENT.test( node.value ) ) {
5255
continue;
5356
}

0 commit comments

Comments
 (0)