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

Nested code blocks are ignored in literate markdown #3342

Open
joelberkeley opened this issue Jul 1, 2024 · 1 comment
Open

Nested code blocks are ignored in literate markdown #3342

joelberkeley opened this issue Jul 1, 2024 · 1 comment

Comments

@joelberkeley
Copy link
Contributor

joelberkeley commented Jul 1, 2024

Steps to Reproduce

Type check the following markdown

```idris
x : Nat
x = ""
```

* some text
  ```idris
  y : Nat
  y = ""
  ```

Expected Behavior

Both code blocks fail type-checking

Observed Behavior

Only the first fails

@jfdm
Copy link
Collaborator

jfdm commented Jul 4, 2024

This is expected behaviour, but not really desired behaviour.

The parser behind the literate mode is rather naive for blocks, and expects the blocks to be delineated by markers that occur at the start of the line, content too.

When fixing this 'issue' the parser would need to keep track of indentation.

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