Skip to content

docs: VitePress code annotations + one mis-rendered list (Phase J) - #922

Open
ocots wants to merge 1 commit into
mainfrom
docs/code-presentation
Open

docs: VitePress code annotations + one mis-rendered list (Phase J)#922
ocots wants to merge 1 commit into
mainfrom
docs/code-presentation

Conversation

@ocots

@ocots ocots commented Aug 31, 2026

Copy link
Copy Markdown
Member

What

Phase J: use the VitePress code-block features DocumenterVitepress exposes but the site never used (grep -r '\[!code' docs/src → 0). Plus the one source-level ordered list the DocumenterVitepress#150 mis-numbering bug hits.

J turned out small. The only page with genuine before/after pairs is migration.md. Nothing else in the current docs has a before/after pair, a "one line that matters" long snippet, or two genuine alternatives side by side. Full classification in .reports/campaign/J-code-presentation.md.

Changes

migration.md

  • 3 # before / # after block pairs → one block each with # [!code --] / # [!code ++] (red/green diff gutter). Inline explanatory comments (# 3 positional / # paired keywords) kept — the [!code …] token is stripped from the rendered comment.
  • the OpenLoop construction trap → # [!code error]
  • the 4-positional silent-misread call → # [!code warning]
  • both [!code]-in-admonition, verified to render (has-error / has-warning in the built HTML)

flows/overview.md

  • "Three things this section does" ordered list → unordered. DocumenterVitepress mis-numbers any ordered list whose items carry block content (slight updates tutos + juliacon #150); these three are a set, not a sequence.

Not touched: the api/* ordered lists (same bug, but sourced from CTBase/CTSolvers docstrings — cross-repo); executed @example blocks (annotations don't work there); abstract-syntax.md's :( … ) grammar patterns (E1's deliberate choice); gpu.md (#885).

Companion

A Handbook/VITEPRESS-DOC.md "Presenting code" section (the feature table, the static-fences-only constraint, a before/after example, the "no code-group for a correspondence pair" rule) goes as a separate Handbook PR.

Verification

Full julia --project=. docs/make.jl: exit 0, 0 Cannot resolve @ref. migration.html has 10 line diff spans (5+5), 1 has-error, 1 has-warning; flows/overview.html has no <ol>. Only build errors are the 4 unchanged Phase-D @extref items.

Add the run documentation label to build the site in CI.

🤖 Generated with Claude Code

…hase J)

migration.md — the site's only page with genuine before/after pairs:
- three `# before` / `# after` block pairs collapsed into one block each,
  using `# [!code --]` / `# [!code ++]` (green/red diff gutter)
- the `OpenLoop` construction trap marked `# [!code error]`
- the 4-positional silent-misread call marked `# [!code warning]`
  (both inside `!!! warning` admonitions — verified to render there)

flows/overview.md — the "Three things this section does" ordered list
became an unordered list: DocumenterVitepress mis-numbers any ordered list
whose items carry block content (LuxDL/DocumenterVitepress.jl#150), and
these three are a set, not a sequence.

The `api/*` ordered lists have the same bug but live in CTBase/CTSolvers
docstrings — cross-repo, out of scope here.

Verified: full docs build exit 0, 0 unresolved @ref; `has-diff` /
`has-error` / `has-warning` classes present in migration.html, no `<ol>`
in flows/overview.html.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ocots ocots added the run documentation Trigger Documentation label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run documentation Trigger Documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant