Skip to content

A page that is wrapped has to stay wrapped (check:line-length) - #330

Merged
oblomov-dev merged 1 commit into
mainfrom
claude/funny-clarke-8i7ydw
Sep 21, 2026
Merged

oblomov-dev merged 1 commit into
mainfrom
claude/funny-clarke-8i7ydw

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

Twice in two days, a paragraph edited in the browser came back as one long line — 140 characters, then 106, both in the first paragraph of insight #3. Nothing was red: no gate reads the shape of a line. The rendering is identical, so the cost is the diff — a paragraph on one line is one changed line instead of three, and every later correction to it reads as a rewrite of the whole thing.

The rule, and why it is not a column

The manual is not written to one column and should not be:

pages
wrapped 39
one line per paragraph 59
in between 64

A site-wide column would be a reformat of two thirds of the pages, not a gate. So the rule is the drift: a page whose prose already sits inside 80 characters may not acquire a line outside it. 66 pages are held; the other 97 are left alone, and start being held the day somebody wraps them.

What is not prose, and why each one is not

  • fenced code, frontmatter, tables — a table wraps at the cell
  • HTML, headings, image alt text — one line by construction
  • the caption under an image when it repeats that alt text word for word — the two are meant to be comparable at a glance, so wrapping only the caption would end that. An italic line that is not the alt text is prose like any other.
  • a line that is only long because of one unbreakable URL
  • the generated samples: and api: blocks — wrapping one of those by hand is a change the next regeneration undoes

npm run fix:line-length

The gate found 13 drifted lines already, on nine pages: insights 22, 24 and 36, the linter and VS Code pages, url_handling, hello_world, deprecations and logo. They are rewrapped in this PR.

A rewrap is whitespace only — and that is verified rather than asserted. Two checks ran over the nine pages: the words are identical ignoring where the breaks fall, and the rendered article is identical in text and in structure. That second check is what caught the two bugs in the rewrapper:

  1. It tore the punctuation off an atomic token — `abap2ui5.mcp.reposRoot` , instead of `abap2ui5.mcp.reposRoot`,. Word comparison caught this one.
  2. It swallowed a ::: tip container into the paragraph, which would have broken the callout on hello_world. Word comparison could not see this — the words were all still there, in order.

Wiring

Fourteenth gate, so it is named in the check script, in check.yml, in deploy.yml, and in the four documents that count them in prose — test/gates.test.mjs already holds all three lists and the count against each other, and it went red until all of them were updated.

test/line-length.test.mjs pins the rule (11 cases, including one that holds the manual itself to it). The floor: the gate exits 1 when no page counts as wrapped, which would mean its glob or its fence handling stopped matching rather than that the manual went loose.

Gates

All fourteen pass locally except the two this environment cannot run: build (build-site.mjs needs the playground checkout or network the proxy blocks) and check:samples (skips without a samples checkout).

🤖 Generated with Claude Code

https://claude.ai/code/session_0182AiPodwfGRKPNZG9D5epe


Generated by Claude Code

Twice in two days, a paragraph edited in the browser came back as one long
line - 140 characters, then 106, both in the article's first paragraph.
Nothing was red: no gate reads the shape of a line. The cost is not the
rendering, which is identical, but the diff: a paragraph on one line is one
changed line instead of three, so every later correction to it reads as a
rewrite of the whole thing.

The manual is not written to one column and should not be. 39 pages are
wrapped, 59 are one line per paragraph, 64 are in between - a site-wide
column would be a reformat of two thirds of the pages rather than a gate.
So the rule is the drift, not the column: a page whose prose already sits
inside 80 characters may not acquire a line outside it. 66 pages are held;
the other 97 are left alone and start being held the day somebody wraps
them.

What is not prose, each for a reason: fenced code, frontmatter, tables
(they wrap at the cell), HTML, headings and image alt text (one line by
construction), the caption under an image when it repeats that alt text
word for word (the two are meant to be comparable at a glance), a line
that is only long because of one unbreakable URL, and the generated
samples:/api: blocks - wrapping one of those by hand is a change the next
regeneration undoes.

`npm run fix:line-length` rewraps a drifted paragraph, and the gate found
13 already: on 22, 24 and 36, the linter and vscode pages, url_handling,
hello_world, deprecations and logo. A rewrap is whitespace only, and it is
verified as such rather than asserted - the words are identical and so is
the rendered article, which is what caught the two bugs in the rewrapper:
it tore the punctuation off a code span (`x` , not `x`,) and it swallowed
a ::: container into the paragraph, which would have broken the callout on
hello_world.

Fourteenth gate, so it is named in the check script, both workflows and
the four documents that count them - test/gates.test.mjs holds all three
lists and the count against each other.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0182AiPodwfGRKPNZG9D5epe
@oblomov-dev
oblomov-dev merged commit 3c4558a into main Sep 21, 2026
1 check passed
@oblomov-dev
oblomov-dev deleted the claude/funny-clarke-8i7ydw branch September 21, 2026 14:26
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.

2 participants