Skip to content

Commit ff0ff75

Browse files
sjsyrekclaude
andcommitted
docs(api): document literal __VAR_n__/__CODE_n__ token limitation
Text preservation protects code blocks and variable placeholders with internal tokens, so source text literally containing the token alphabet can be rewritten during restoration (cli-2a5q, wontfix: probe showed 256/256 token survival across 8 languages and both model generations, and the sync validator already hard-errors on placeholder loss). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6cc9954 commit ff0ff75

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎docs/API.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ Translate text directly, from stdin, from files, or entire directories. Supports
241241
- `--formality LEVEL` - Formality: `default`, `more`, `less`, `prefer_more`, `prefer_less`, `formal`, `informal`
242242
- `--model-type TYPE` - Model type: `quality_optimized`, `prefer_quality_optimized`, `latency_optimized` (no CLI default; the API server selects the model when omitted)
243243
- `--preserve-code` - Preserve code blocks (markdown, etc.)
244+
- Known limitation: code blocks and variable placeholders (`{name}`, `%s`, etc.; always preserved) are protected internally with `__CODE_n__`/`__VAR_n__` tokens, so source text that literally contains such tokens may be rewritten during restoration.
244245
- `--preserve-formatting` - Preserve line breaks and whitespace formatting
245246
- `--split-sentences LEVEL` - Sentence splitting: `on` (default), `off`, `nonewlines`
246247
- `--tag-handling MODE` - XML tag handling: `xml`, `html`

0 commit comments

Comments
 (0)