JuliaDocs/Documenter.jl

Generalize the at-example line hiding

Open

#2,025 建立於 2023年1月25日

在 GitHub 查看
 (0 留言) (2 反應) (0 負責人)Julia (513 fork)batch import
Type: Enhancementhelp wanted

倉庫指標

Star
 (910 star)
PR 合併指標
 (平均合併 16天 9小時) (30 天內合併 3 個 PR)

描述

Currently, you can only hide lines that end with # hide. We could generalize it by allowing the user to pass a hide option to the block which should be a regex (or an array of regexes) that we then occursin against the lines.Potential use cases:

  • Hiding JuliaFormatter #! format: off with e.g. a r"^#! format:" regex.
  • Filtering out comments with r"^#
```@example my-block; hide = r"^#! format:"
#! format: off
weirdly_formatted_code_that_I_want_to_keep_that_way(...)
#! format: on
```

X-ref: https://discourse.julialang.org/t/interaction-between-logging-jl-juliaformatter-jl-and-documenter-jl/93504

貢獻者指南