Problem
The compatibility Markdown scanner recognizes math fences only as unindented,
exactly-three-backtick openers and closers. Valid CommonMark fence forms using tildes,
four or more markers, up to three spaces of indentation, or a closer longer than the
opener are missed or misreported, so equations in those containers do not reach algebra
checks.
This affects v0.1.5 (3a4f090ac88c96a7e558ee21783873009c7c581d), v1.0.0
(251f35ba9ef350d2a8d4ff5eb63ea9b68e446b8d), v1.1.0
(3996a6cf508e175bead3f325b3ce4ec637e612d1), main
76955a90e0901835035bb9ff27a0de7463d60938, and the open PR heads
0a2c5bd9a29cd1724f63bf81778d967cf79e264b and
ffbd538aef68abc93f1368c001e4da2086214dbd. PR #81 head
6be382eddd5b8545556196f429ac4bb35504718a already accepted a longer backtick closer,
but that behavior did not reach the release tags or main and that head still omitted
tilde and indented math fences. The reproduction was run with Python 3.14.6 on Fedora
Linux 44, kernel 7.1.4-202.fc44.x86_64.
Reproduction
From the affected main checkout:
cat > math-fence.md <<'EOF'
```math
x=x+1
EOF
PYTHONPATH=src python -m scieqlint check math-fence.md
status=$?
printf 'exit: %s\n' "$status"
Observed:
```text
math-fence.md:1:1: warning SCAN001 unterminated math container
exit: 0
```
Changing both delimiters to `~~~~`, using `~~~math`, or indenting a triple-backtick
math fence by one to three spaces silently reports no diagnostics and checks zero math
blocks.
## Expected behavior
The scanner should use the CommonMark fence identity: at least three matching
backticks or tildes, an opener indented by at most three spaces, and a closer using the
same character with at least the opener's length. The reproduction is a closed math
fence and should check `x=x+1`, emit `ALG001` on line 2, and exit 1.
An exact triple-backtick math fence must remain active. A four-space-indented block,
a shorter or different-character explicit closer, and math-looking content in a
non-math fence must retain their distinct code/unterminated behavior rather than being
accepted as this branch.
Problem
The compatibility Markdown scanner recognizes math fences only as unindented,
exactly-three-backtick openers and closers. Valid CommonMark fence forms using tildes,
four or more markers, up to three spaces of indentation, or a closer longer than the
opener are missed or misreported, so equations in those containers do not reach algebra
checks.
This affects v0.1.5 (
3a4f090ac88c96a7e558ee21783873009c7c581d), v1.0.0(
251f35ba9ef350d2a8d4ff5eb63ea9b68e446b8d), v1.1.0(
3996a6cf508e175bead3f325b3ce4ec637e612d1), main76955a90e0901835035bb9ff27a0de7463d60938, and the open PR heads0a2c5bd9a29cd1724f63bf81778d967cf79e264bandffbd538aef68abc93f1368c001e4da2086214dbd. PR #81 head6be382eddd5b8545556196f429ac4bb35504718aalready accepted a longer backtick closer,but that behavior did not reach the release tags or main and that head still omitted
tilde and indented math fences. The reproduction was run with Python 3.14.6 on Fedora
Linux 44, kernel
7.1.4-202.fc44.x86_64.Reproduction
From the affected main checkout:
EOF
PYTHONPATH=src python -m scieqlint check math-fence.md
status=$?
printf 'exit: %s\n' "$status"