Skip to content

fix(REN-4): use mathematical angle brackets U+27E8/U+27E9 in delimiter table#232

Open
kostub wants to merge 2 commits into
masterfrom
em/2026-06-11-issues/t8
Open

fix(REN-4): use mathematical angle brackets U+27E8/U+27E9 in delimiter table#232
kostub wants to merge 2 commits into
masterfrom
em/2026-06-11-issues/t8

Conversation

@kostub

@kostub kostub commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes REN-4 from issues.md: the delimiter table in +[MTMathAtomFactory delimiters] mapped \langle, \rangle, <, and > to the deprecated CJK angle brackets U+2329/U+232A, while the symbol (open/close) table already mapped them to the correct mathematical angle brackets U+27E8/U+27E9. This caused:

  • \langle x \rangle and \left\langle x \right\rangle to render with different glyphs.
  • \left\langle…\right\rangle and all \big*\langle forms to be unable to grow, because all 8 bundled fonts only ship growable vertical variants for uni27E8/uni27E9 — not uni2329/uni232A.

Changes:

  • iosMath/lib/MTMathAtomFactory.m: change all four delimiter-table entries (<, >, langle, rangle) from U+2329/U+232A to U+27E8/U+27E9.
  • iosMathTests/MTMathListBuilderTest.m: update two existing fixtures whose expected boundary nuclei were the old (deprecated) code points. Serialization assertions (\left< x\right> , \Biggm<) are unchanged because </> remain the shortest inverse commands for U+27E8/U+27E9.
  • Add regression test testAngleBracketDelimiterConsistency that directly encodes the invariant: both the symbol-table path (\langle x \rangle) and the delimiter-table path (\left\langle x \right\rangle, \left< x \right>) must produce U+27E8/U+27E9 nuclei.

Test plan

  • Verified RED: new regression test fails before the production fix (6 assertion failures, all / vs /).
  • Verified GREEN: all 293 tests pass after the fix.
  • swift build succeeds cleanly.
  • Serialization round-trip preserved: \left< x\right> and \Biggm< unchanged.

🤖 Generated with Claude Code

…r table

The delimiter table in +[MTMathAtomFactory delimiters] mapped \langle,
\rangle, < and > to the deprecated CJK angle brackets U+2329/U+232A.
The symbol (open/close) table already used U+27E8/U+27E9, so the same
logical bracket rendered with different glyphs depending on context.
All bundled fonts only ship growable variants for uni27E8/uni27E9 — not
uni2329/uni232A — meaning \left\langle…\right\rangle could not grow.

Change all four delimiter-table entries to U+27E8/U+27E9. Update the two
test fixtures that asserted the old code points, and add a regression test
that directly encodes the invariant: both paths must produce the same glyph.
Round-trip serialization is preserved (</>  remain the shortest inverse
commands for U+27E8/U+27E9).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the angle bracket delimiters (<, >, \langle, \rangle) to use the mathematical Unicode characters U+27E8 and U+27E9 instead of the deprecated U+2329 and U+232A characters, and adds a new test to ensure delimiter consistency. The feedback suggests using uppercase hex digits for the Unicode escape sequence in the test file to maintain consistency with the rest of the codebase.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread iosMathTests/MTMathListBuilderTest.m Outdated
@[ @"\\Bigm\\|", @(kMTMathAtomRelation), @(kMTDelimiterSize2), @"\u2016" ],
@[ @"\\biggm\\Vert", @(kMTMathAtomRelation),@(kMTDelimiterSize3), @"\u2016", @"\\biggm\\|" ],
@[ @"\\Biggm\\langle", @(kMTMathAtomRelation),@(kMTDelimiterSize4), @"\u2329", @"\\Biggm<" ],
@[ @"\\Biggm\\langle", @(kMTMathAtomRelation),@(kMTDelimiterSize4), @"\u27e8", @"\\Biggm<" ],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the rest of the codebase (including line 500 in this file and MTMathAtomFactory.m), please use uppercase hex digits for the Unicode escape sequence (\u27E8 instead of \u27e8).

        @[ @"\\Biggm\\langle", @(kMTMathAtomRelation),@(kMTDelimiterSize4), @"\u27E8", @"\\Biggm<" ],

@kostub

kostub commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

EM-REVIEW v1

Severity: NON-BLOCKING. No blocking issues found. Independently sanity-checked the diff via gh pr diff 232.

Summary

REN-4 fix is correct and complete. The four delimiter-table entries in iosMath/lib/MTMathAtomFactory.m (<, >, langle, rangle) move from the deprecated CJK angle brackets U+2329/U+232A to the mathematical angle brackets U+27E8 ⟨ / U+27E9 ⟩, so the delimiter table now agrees with the symbol table.

Verified findings

  • Codepoints correct: U+27E8 (⟨ left), U+27E9 (⟩ right).
  • All four delimiter-table entries updated; delimiter and symbol tables now agree. No remaining U+2329/U+232A references in the changed entries.
  • Reverse-map delimValueToName round-trip stays safe: < remains the shortest command for U+27E8, so serialization fixtures (\left< x\right>) are unchanged.
  • New regression test testAngleBracketDelimiterConsistency is meaningful: it exercises both the symbol-table path (\langle x \rangle) and the delimiter-table path (\left\langle, \left<), asserts identical nuclei (U+27E8/U+27E9), and asserts the serialization round-trip stays \left< x\right>.
  • Two stale fixtures updated correctly (MTMathListBuilderTest.m lines ~500 and ~1719).
  • Prior pass reports 293 tests pass.

Minor nit (non-blocking)

  • The fixture at line ~1719 uses lowercase while the rest of the diff uses uppercase . Functionally identical; cosmetic only.

No approval, no merge — review comment only.

Addresses code review nit: line 1719 used a lowercase ⟨ escape
while the rest of the file uses uppercase hex. Functionally identical;
purely cosmetic.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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