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

juvix.md Text and Juvix Codeblocks Misbehave with !!! and ??? .md Blocks #95

Closed
agureev opened this issue Nov 24, 2023 · 0 comments · Fixed by anoma/juvix#2539
Closed
Labels
bug Something isn't working

Comments

@agureev
Copy link
Contributor

agureev commented Nov 24, 2023

With PR #90 we can now write actual code in the juvix code-blocks which allows for the code to be properly highlighted in the documentation.

However, the current codeblocks seem to misbehave once they interact with !!! or ??? environments.

E.g. here is the code in functions.juvix in PR #90:

!!! note

    Here are some key points to remember about using default argument values in
    Juvix:

    1. **No Referencing Previous Arguments**: Default values cannot refer to
      previous arguments. Therefore, the following code would result in a scope
      error:

        ```text
        f {n : Nat := 0} {m : Nat := n + 1} ....
        ```
     ...

Here is how it looks when compiling the docs:

image

While in PR #93 with the solution code:

??? info "Solution"

    ```juvix
    module SolNMaybe-Poly-From;
      import Stdlib.Prelude open;

      fromMaybe {A} (d : A) : Maybe A -> A
        | (just n) := n
        | nothing := d;
    end;
    ```

is not put inside the appropriate box as here:

image

@agureev agureev added the bug Something isn't working label Nov 24, 2023
@agureev agureev changed the title juvix.md Text and Juvix Codeblocks Misbehave with !!! and `??? .md Blocks juvix.md Text and Juvix Codeblocks Misbehave with !!! and ??? .md Blocks Nov 24, 2023
jonaprieto added a commit to anoma/juvix that referenced this issue Nov 27, 2023
- Closes #2528
- Closes anoma/juvix-docs#95

After this PR is merged, this will fix the misbehaving of code blocks
within !!!/??? Environments spotted in
anoma/juvix-docs#95. The result would be
as expected:

Already deployed, e.g. https://docs.juvix.org/0.5.4/tutorials/learn/

![screencapture-localhost-8000-reference-language-functions-2023-11-24-21_28_39](https://github.com/anoma/juvix/assets/1428088/85877b1a-0428-40b2-b900-147b3f386e8c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant