Review ANSI @repl documentation examples with DocumenterVitepress 0.3.5

Aperta
#904 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ocots ci sta già lavorando.

Dal 30/8/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Context

ct-conventions documents a historical limitation of DocumenterVitepress: before v0.3.5, ANSI-colored output from @repl could be rendered as raw escape sequences. DocumenterVitepress v0.3.5 fixes this behavior (#373), so documentation workarounds may now be obsolete.

Requested review

Please audit the OptimalControl.jl documentation for:

  • @repl blocks using try/catch solely to prevent documentation-build failures;
  • manual showerror(IOContext(stdout, :color => false), e) calls used only to avoid ANSI rendering issues;
  • @example blocks chosen solely because colored @repl output was historically broken;
  • opportunities to use direct exception expressions in @repl, relying on REPL-style exception capture;
  • cases where @ansi is more appropriate for an explicit terminal-color demonstration.

Keep @example where regular evaluated-example formatting is preferable, and preserve explicit monochrome output when it is a deliberate presentation choice. Confirm the documentation environment uses DocumenterVitepress >= 0.3.5 and verify the generated site with the documentation build.

Reference implementation

CTBase.jl applied this cleanup in PR control-toolbox/CTBase.jl#547, tracked by issue control-toolbox/CTBase.jl#546. The guidance is in ct-conventions, rules/site.md, notes on the VitePress backend:
https://github.com/control-toolbox/ct-conventions/blob/main/rules/site.md#notes-on-the-vitepress-backend-no-identifier

Please report which blocks were reviewed and update the relevant documentation where appropriate.

Lingua principale
Julia
Stelle
135
Fork
11
Merge medio
7h 51m
PR unite (30g)
22

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di control-toolbox/OptimalControl.jl

Tutte le issue di control-toolbox/OptimalControl.jl

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.