Raw block inside div is treated as a codeblock.
Nobody has claimed this yet.
- Dominant language
- Gleam
- Stars
- 65
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Raw blocks in djot use triple backticks like code blocks but require the language to start with an `=` symbol to differentiate them. Raw blocks are passed directly to the renderer
````djot
::: actions
``` =toml
[[actions]]
this = "is a test"
```
:::
````
The above djot document parses in the official [djot playground](https://djot.net/playground/?text=%3A%3A%3A+actions%0A%60%60%60+%3Dtoml%0A%5B%5Bactions%5D%5D%0Athis+%3D+%22is+a+test%22%0A%60%60%60%0A%3A%3A%3A&mode=ast&sourcepos=false) as:
```
doc
div class="actions"
raw_block format="toml" text="[[actions]]\nthis = \"is a test\"\n"
```
But jot incorrectly parses this as a code block. Logging the div's `items:` field shows:
```gleam
[Codeblock(dict.from_list([]), Some("=toml"), "[[actions]]\nthis = "is a test"\n")]
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal Djot example in the issue and trace the parser entry point that handles fenced blocks inside div contents. Done when the example produces a raw_block with format="toml" rather than a codeblock, while ordinary fenced code blocks still parse as codeblocks.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100