Repository navigation
A MathML type selector is written as its name (quire#1178) - #107
Merged
Merged
Conversation
…pe, quire#1178) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HwLsLqnBm3u7Rwk8pezYB3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #108
Head: 19f8baa
Route decision (quire#1178, written by research)
Problem: a book's
math{font-family}never reaches an equation, so quire#1179's default math font cannot be beaten by the book's own.Routes:
data-book-element, css and the reader follow). Bridge's op 14 already takes amath:tag, but dom'sbook_taghas none, so it needs a new dom function, a relock chain css, dom, quire, and in layout 1 the reader's[data-book-element]:not(code,...){font-family:inherit!important}would then override both the book's face and the default, so that rule needs a:not(math)too. Largest change, most places to be wrong.data-alignis,_align_mark): quire would parse the sheet'smathfont-family itself and map it to the generated face names, which only css knows. A second reader of the same sheet and a copy of css's face mapping: not the owning layer.[data-book-container="c1"] math{...}matches dom's math element. The face mapping, the layer order (reader-base under book) and the reader's rules stay as they are; dom needs only a relock (itsadd_book_sheetcallsbook_sheet_pieces), quire a relock and the spec.Chosen: 3. Overlap rule (repository-prototype's CLAUDE.md): no signature or type changes, so no dependent fails to check and the verify rule is met; the old output matched only a
divorspannamed like a MathML element, which no book makes, so the old form is not kept beside it (stated in CLAUDE.md, keyword math-type). Known limits, written there too: a class or id on a MathML element is not matched (the reader setsclass, notdata-book-class), and thenth-child ... of :where([data-book-element])counts skip them.Plan
_w_math_namein_w_type: the names of dom's_math_element_okare written as themselves (lower case).mtable,mtd,mtr,mathselectors); four new tests.Execution
Mutation: with
src/book.batsstashed (the old walk) the run failstest_fixture_typst_reflow,test_fixture_typst_fixed,test_math_type_font_family,test_math_type_book_faceandtest_math_type_descendant_and_not;test_math_type_html_name_stays_scopedpasses both ways (it guards the other names).Evidence
CI's
checkis the evidence for the dynamic tests (tests/dynamic/run.sh, none of which names a MathML selector:grep -rn mtable testsis empty).Generated by Claude Code