Repository navigation
Preserve Unicode source offsets through selectable reflow - #159
Draft
isomorphisms wants to merge 8 commits into
Draft
isomorphisms wants to merge 8 commits into
isomorphisms wants to merge 8 commits into
Conversation
…ecked Unicode break positions
Annotate the candidate selection, bound greedy recursion by the candidate count and refuse exhausted descent, and keep multiline smoke applications within the pinned parser's accepted syntax. The original Unicode/source-offset, all-mode, unsupported-mode and full reflow assertions remain intact.
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.
Scope
Follow-on to IB PR #157, Implement selectable reflow algorithms, streaming and incremental reuse. Adds a source-bound line-breaking representation, rather than routing canonical text through the previous lossy space-joined segment output.
IB.Reflow.SourceBreaksrepresents verified code-point offsets (not UTF-8 byte offsets), mandatory/optional/soft-hyphen/zero-width/EOF cuts and source-bound line spans. Original decoded source is recovered exactly from contiguous spans.IB.Reflow.Sourceprovidesreflow_sourceandreflow_at_breaks: selects greedy, squared/cubic/minimax, final-line-free and exact minimum-line-count optimizers. A displayed soft-hyphen cut gets a visible hyphen; the source retains U+00AD. Hard line separators/ZWSP are suppressed only in derived display text.SourceReflowSmoke.idricchecks Unicode/RTL examples, combining/emoji joiner/CRLF refusal, soft-hyphen display, source reconstruction, mandatory blank lines, NBSP and zero-width spaces, overwide preservation, and unsupported mode errors.Acceptance boundary
Host compilation and behavior passed at 4a7380c in foundation run 39344768139, with exact-text oracle and universal gate also passing. CI-REPAIR-01 adds an explicit candidate type, bounded total greedy descent with exhaustion refusal, and pinned-parser-compatible smoke applications without removing any assertion. Native pixel shaping, grapheme segmentation, A1/C67 physical execution and full UAX #14 conformance are NOT_RUN. Draft and unmerged; no release/merge claim.