Sync from livetemplate@v0.23.0 - #131
Conversation
|
Closing in favour of #132. This branch carries the correct v0.23.0 content, but through a rewriter with a bug I introduced in #130: #132 fixes the rewriter, adds regression tests for the inline-span, multi-span and unbalanced-backtick cases, and re-syncs at v0.23.0 — which repairs the five corrupted pages and brings down the same release content this PR carries. It is a strict superset, so merging this first would only publish the corruption again. The rolling |
… broke (#132) Fixes a bug introduced in #130 that corrupted five published pages. RewriteRelative skipped fenced code blocks but not inline code spans, and Go generic call syntax inside one — `AssertPureState[T](t)` — contains the exact ](...) shape a markdown link does. The rewriter resolved (t) as a relative path, so documented code rendered on the live site as a GitHub URL, in reference/session.md (three places), reference/limitations.md and guides/ephemeral-components.md. The #130 plan flagged this exact risk; the guard written for it covered only the fenced case, which is not the one that occurs in this corpus. rewriteOutsideCodeSpans splits a line on backticks and rewrites only the even-indexed prose segments. A line with an odd number of backticks cannot have its spans paired — the parity is wrong from the stray one onward, so code would land on an "outside" index and be rewritten anyway — and is left entirely alone. That costs a genuine link on a malformed line staying as upstream wrote it, which is recoverable; mangling documented code is not. Three regression tests, all failing against the previous implementation: an inline span alongside a real link, multiple spans interleaved with links, and the unbalanced-backtick case. The last one caught a wrong claim in the first version of the safety comment, which is why the explicit count check exists rather than relying on parity. Re-syncs at v0.23.0, which repairs the five pages and carries the release's own content — the Async/Pending guide rewrite, the Validate reference and the lvt-el overlay section from livetemplate#530. Supersedes #131, closed unmerged because it carried the same content through the unfixed rewriter. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Automated sync from
https://github.com/livetemplate/livetemplateat refv0.23.0.See content/_meta/source-of-truth.yaml for the page mapping that drives this sync. Bring concerns about a specific change to the source repo, not this PR — edits made directly here will be overwritten on the next sync.