Review ANSI @repl documentation examples with DocumenterVitepress 0.3.5

Đang mở
#904 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ocots đang làm issue này rồi.

Từ ngày 30/8/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.

Ngôn ngữ chính
Julia
Star
135
Fork
11
Merge trung bình
7 giờ 51 phút
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của control-toolbox/OptimalControl.jl

Tất cả issue của control-toolbox/OptimalControl.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.