Skip to content

feat: title_case word_separator and separate separator stage ops - #7

Merged
ronaldtse merged 1 commit into
mainfrom
feat/directive-kwargs
Sep 29, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
feat/directive-kwargs

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

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.
  • Infinite parse loop fixed — the kwargs path exposed it: an unrecognized token on the final line skipped to EOF, where _skip_line cannot 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_PATH set; 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).

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.
@ronaldtse
ronaldtse merged commit 7dc03bd into main Sep 29, 2026
6 checks passed
@ronaldtse
ronaldtse deleted the feat/directive-kwargs branch September 29, 2026 10:11
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