Skip to content

feat: add math-delimiter validator - #22

Open
m-messer wants to merge 1 commit into
test-harnessfrom
validator
Open

feat: add math-delimiter validator#22
m-messer wants to merge 1 commit into
test-harnessfrom
validator

Conversation

@m-messer

@m-messer m-messer commented Sep 1, 2026

Copy link
Copy Markdown
Member

New in2lambda.validation package that checks the #/## markdown contract for unbalanced or misplaced KaTeX math delimiters before conversion.

  • validation/delimiters.py: math_delimiter_checker() scans markdown char by char and returns a MathDelimiterError enum member (PASSED on success).
  • validation/__init__.py: check_markdown() aggregates checks into a list of problems, ready to be surfaced as warnings by the Markdown filter and the wizard.
  • Ported from conversion2025/tools and testing/{validator,validator_classes}.py on Summer2025; sentinel exception classes replaced with an enum. All of that branch's validator_tests.py cases ported to tests/test_validation.py.

Stack: test-harness ← validator ← markdown-filter ← …
Base: test-harness — review/merge #21 first.

🤖 Generated with Claude Code

New in2lambda.validation package that checks the #/## markdown contract for
unbalanced or misplaced KaTeX math delimiters before conversion:

- validation/delimiters.py: math_delimiter_checker() scans markdown char by
  char and returns a MathDelimiterError enum member (PASSED on success).
- validation/__init__.py: check_markdown() aggregates checks into a list of
  problems, ready to be surfaced as warnings by the Markdown filter and the
  wizard.

Ported from conversion2025/tools and testing/{validator,validator_classes}.py
on the Summer2025 branch; the sentinel exception classes are replaced with an
enum. All of that branch's validator_tests.py cases are ported to
tests/test_validation.py.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VXb8aZqgFBjoeuuddjW6r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant