Skip to content

Commit c603dbf

Browse files
committed
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 ---
1 parent 63f5705 commit c603dbf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • lib/node_modules/@stdlib/_tools/remark/plugins/remark-lint-expected-html-sections/lib

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)