Repository navigation
Show the levels set by Phase X in a verbose table - #15
Merged
Merged
Conversation
print_table reports "(no changes)" when the Before/After rows match, and Phase X only passed it types. An isolate or embedding without an override changes no types, so the level assignment X1-X8 makes was never shown (e.g. example 7 printed "Rule X1-X9 (no changes)"). Phase X now prints an "X1-X8 (levels)" table (Before = paragraph level from X1) next to the renamed "X1-X9 (types)" table. Update the demo notes for examples 6 and 7, the apply_explicit_levels docstring (FSI type change), README.md and CLAUDE.md.
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.
Problem
print_tableprints "(no changes)" when the Before/After rows match, and Phase X only passed it types. An embedding or isolate without an override changes no types, so the level assignment that X1–X8 makes was never shown. Example 7 (LRI/PDI) printed--- Rule X1-X9 --- (no changes), even though the isolated text moves from level 1 to level 2.Change
Phase X now prints two tables:
X1-X8 (levels): Before is the paragraph level (where X1 starts every character), After is the level X1–X8 assigned.X1-X9 (types): the existing table, renamed. It shows overrides, FSI resolution and X9 turning characters into BN.Example 7 now shows:
Also:
apply_explicit_levelsdocstring now mentions that an FSI's type becomesRLI/LRI(X5c).demo.pyname the new tables (checked against real output).Testing
python tests/run_bidi_tests.py: 91,707 passed, 0 failedpython tests/run_bidi_type_tests.py: 770,241 passed, 0 failedpython bidi.py --allruns without errors