From c603dbffa2999bf9935056e08e12ceecc99700e2 Mon Sep 17 00:00:00 2001 From: Mara Averick Date: Fri, 20 Mar 2026 06:13:00 -0600 Subject: [PATCH] fix: allow remark-lint-expected-html-sections to skip yaml Update the linter to ignore YAML frontmatter nodes when identifying the anchor node for expected HTML sections. Assisted-by: Claude-Opus-4-6 --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../plugins/remark-lint-expected-html-sections/lib/linter.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/node_modules/@stdlib/_tools/remark/plugins/remark-lint-expected-html-sections/lib/linter.js b/lib/node_modules/@stdlib/_tools/remark/plugins/remark-lint-expected-html-sections/lib/linter.js index 3287dee52a56..75bb9746aaf3 100644 --- a/lib/node_modules/@stdlib/_tools/remark/plugins/remark-lint-expected-html-sections/lib/linter.js +++ b/lib/node_modules/@stdlib/_tools/remark/plugins/remark-lint-expected-html-sections/lib/linter.js @@ -48,6 +48,9 @@ function getAnchorNode( tree ) { for ( i = 0; i < tree.children.length; i++ ) { node = tree.children[ i ]; + if ( node.type === 'yaml' ) { + continue; + } if ( node.type === 'html' && RE_HTML_COMMENT.test( node.value ) ) { continue; }