-
Notifications
You must be signed in to change notification settings - Fork 444
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
Support non-Lean code blocks in the mdbook #1421
Comments
Mwe: 1.in (this chapter is rendered by Alectryon in the CI)
```lean
{{#include test.lean}}
```
#check "hello world"
/-!
This is a comment
```
this is a code block
```
-/
#check "hello world again"
<main>
<p>(this chapter is rendered by Alectryon in the CI)</p>
<pre><code class="language-lean">#check "hello world"
/-!
This is a comment
</code></pre>
<p>this is a code block</p>
<pre><code>-/
#check "hello world again"
</code></pre>
</main> If I've understood the pipeline correctly, the expected output needs to be something like <main>
<pre><code class="language-lean">#check "hello world"</code></pre>
<p>This is a comment</p>
<pre><code>this is a code block</code></pre>
<pre><code>#check "hello world again"</code></pre>
</main> |
This works fine using (note the number of backticks)
right? It's only |
Increasing backticks gives <main>
<p>(this chapter is rendered by Alectryon in the CI)</p>
<pre><code class="language-lean">#check "hello world"
/-!
This is a comment
```lean
this is a code block
```
-/
#check "hello world again"
</code></pre>
</main> is that the correct output? It's equivariant under changing |
What's the nix incantation to get this output? |
It's lean4/.github/workflows/nix-ci.yml Line 88 in 0ec56c3
NIX_BUILD_ARGS ).
(this will get much easier with edolstra/nix@8a0a55f) |
hmmm ok I think this is working then. Still getting
if I build the widget-doc branch with the following code block:
|
Do you have a full example on a branch? I assume that's not you entire file. |
MWE branch: https://github.com/Vtec234/lean4/tree/doc-codeblock-bug (relevant file) then I run nix-shell -A nix
nix build -v --print-build-logs --fallback --update-input lean --no-write-lock-file ./doc#test - And get error:
|
Ah, I misunderstood you then. It works if you use @lovettchris Specifically, the problem is that our
It will send just |
@Kha - this should fix it: leanprover/mdBook#10 |
Description
When adding a tutorial for user widgets in #1407, we tried to embed a JavaScript code block in a module docstring within a literate Lean file. Unfortunately the block seems to be misprocessed and to produce invalid output, also making mdbook tests fail.
Steps to Reproduce
Expected behavior: It is possible to use code blocks in module docstrings in literate Lean files.
Actual behavior: They are miscompiled.
Reproduces how often: 100%
The text was updated successfully, but these errors were encountered: