Repository navigation
feat: title_case word_separator and separate separator stage ops - #7
Merged
Merged
Conversation
title_case gains the word_separator kwarg (parser, converter, engine). Ruby parity: upcase the first character of every line, then of every character following the separator; an empty separator leaves only the per-line casing. separate becomes a real engine op (join every codepoint with the separator, default space) instead of an unsupported construct. Fixes an infinite parse loop the kwargs path exposed: an unrecognized token on the last line skipped to EOF, where _skip_line no longer advances — the stage loop then spun. The kwarg peek now skips inline whitespace first.
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.
What
title_case word_separator: "…"— parser accepts the kwarg, converter passes it through, engine implements Ruby-parity casing (first character of every line, then every character following the separator; empty separator = per-line only).separate [separator "…"]— becomes a real engine op: join every codepoint with the separator (default space). Previously an unsupported construct._skip_linecannot advance, and the stage loop spun forever. The kwarg peek now skips inline whitespace first (the immediate trigger), and the loop is no longer reachable in that state for this form.Tests
29 passed / 1 xpassed with
INTERSCRIPT_MAPS_PATHset; new cases pin the separate op shape, the title_case kwarg shape, and both engine behaviors against the Ruby spec expectations (こんいちは→こ|ん|い|ち|は,hello world\nhello hello→Hello world\nHello hello).