-
Notifications
You must be signed in to change notification settings - Fork 3
Treat Markdown raw HTML as opaque to document analysis #263
Copy link
Copy link
Open
Labels
area:graphGraph model, schema, and export.Graph model, schema, and export.area:referencesLabels, references, duplicate/missing checks.Labels, references, duplicate/missing checks.area:scanner-markdownMarkdown and MyST source scanning.Markdown and MyST source scanning.bugSomething isn't workingSomething isn't workingneeds fixtureNeeds example input/output coverage.Needs example input/output coverage.p2Medium-priority feature issue.Medium-priority feature issue.
Description
Metadata
Metadata
Assignees
Labels
area:graphGraph model, schema, and export.Graph model, schema, and export.area:referencesLabels, references, duplicate/missing checks.Labels, references, duplicate/missing checks.area:scanner-markdownMarkdown and MyST source scanning.Markdown and MyST source scanning.bugSomething isn't workingSomething isn't workingneeds fixtureNeeds example input/output coverage.Needs example input/output coverage.p2Medium-priority feature issue.Medium-priority feature issue.
Problem
SciEqLint analyzes math, references, headings, and anchors inside CommonMark raw HTML
instead of treating raw-HTML token ranges as opaque. At
76955a90e0901835035bb9ff27a0de7463d60938, payloads in each of CommonMark's sevenHTML-block families produce
ALG001,REF002, andSTR001; inline HTML comments andtag attributes also create math and reference facts. The same false facts reach
notebook Markdown cells and
scieqlint graph.This affects v0.1.5 (
3a4f090ac88c96a7e558ee21783873009c7c581d), v1.0.0(
251f35ba9ef350d2a8d4ff5eb63ea9b68e446b8d), v1.1.0(
3996a6cf508e175bead3f325b3ce4ec637e612d1), main, and the open PR heads0a2c5bd9a29cd1724f63bf81778d967cf79e264bandffbd538aef68abc93f1368c001e4da2086214dbd. The reproduction was run with Python3.14.6 on Fedora Linux 44, kernel
7.1.4-202.fc44.x86_64.Reproduction
From a checkout of
76955a90e0901835035bb9ff27a0de7463d60938:Observed:
Replacing the comment with representative type-1 through type-7 HTML blocks (
<pre>,<!-- -->,<? ?>, declarations, CDATA, block tags, and complete custom tags) producesthe same three diagnostics.
Expected behavior
Raw HTML block contents, inline comments, and inline tag/attribute ranges should not
produce general math, reference, heading, anchor, or graph facts, so this fixture should
produce no diagnostics and exit 0. Markdown text between inline tags must remain active.
Dedicated
scieqlint-disable-next-lineandscieqlint-symbolHTML-comment directivesmust also remain active through their existing dedicated interpreters.