Review ANSI @repl documentation examples with DocumenterVitepress 0.3.5

Abierto
#904 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@ocots ya está trabajando en esto.

Desde el 30/8/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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.

Lenguaje dominante
Julia
Estrellas
135
Forks
11
Merge medio
7 h 51 min
PR fusionados (30 d)
22

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de control-toolbox/OptimalControl.jl

Todos los issues de control-toolbox/OptimalControl.jl

Issues similares

Más issues de Julia

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.