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

Literate generating @example blocks when it shouldn't #253

Open
MarkNahabedian opened this issue Sep 16, 2024 · 1 comment
Open

Literate generating @example blocks when it shouldn't #253

MarkNahabedian opened this issue Sep 16, 2024 · 1 comment

Comments

@MarkNahabedian
Copy link

In https://github.com/MarkNahabedian/MattParkerJigsawPuzzleProblem.jl I'm trying to use Literate and Documenter to generate documentation.

The docs/make.jl script first walks the source hierarchy and uses Literate.markdown to process each Julia source file and write a corresponding markdown file to docs/src.
Those .md files are codefenced with @example blocks. Attemptinig to execute those blocks causes Documenter to fail.

In the documentation for Literate.DEFAULT_CONFIGURATION, the explanations for codefence and execute seem inconsistent in that execute should not be true for Markdown files.

Also, in this function

function pick_codefence(::DocumenterFlavor, execute::Bool, name::AbstractString)
it seems to me that the sense of the conditional is inverted from what it should be -- To use @example if execute is true.

@fredrikekre
Copy link
Owner

The execute arg determines if Literate should execute the block or not, not whether Documenter later will try to do it.

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