Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing closing back-ticks on jldoctest causes corrupt documentation but does not fail checks #28

Closed
LilithHafner opened this issue Apr 7, 2024 · 1 comment

Comments

@LilithHafner
Copy link

I forgot some closing backticks in a jldoctest block (fixed here LilithHafner/AliasTables.jl#29) which should, in order of preference

  1. Fail the documentation build
  2. Render okay
  3. Break that docstring's rendering
  4. Break that docstring's rendering and some subsequent content
  5. Break the whole documentation page but still show up as a pass

Right now we're at a 3 or 4 here: https://aliastables.lilithhafner.com/v1.0.0/#AliasTables.probabilities

Moved from LuxDL/DocumenterVitepress.jl#116

@mortenpi
Copy link
Member

mortenpi commented Apr 8, 2024

Closing in favor of JuliaDocs/Documenter.jl#2059 (comment)

The best you can do is a linter -- any sequence of bytes is valid Markdown, so a parser is expected to parse it without complaining:

julia> m = md"""
       Foo

       ```jldoctest
       bar

       Baz
       """
  Foo

  ```jldoctest bar

  Baz

julia> m.content
3-element Vector{Any}:
 Markdown.Paragraph(Any["Foo"])
 Markdown.Paragraph(Any["```jldoctest bar"])
 Markdown.Paragraph(Any["Baz"])

Out of scope for MarkdownAST though -- it doesn't know the source code, so it has no way to know if the AST is intentional or not.

@mortenpi mortenpi closed this as not planned Won't fix, can't repro, duplicate, stale Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants