Describe the bug
According to the Slidev documentation:
Slidev supports optional Comark Syntax (formerly known as MDC, Markdown Components) powered by @comark/markdown-it.
In the Comark documentation, blocks with complex syntax (ol, ul, table, blockquote, pre) can be styled by wrapping them with identical elements (e.g. ::ol)
In Slidev, this does not style the element, but rather wraps a new element around it. Additionally, prettier breaks the formatting of this syntax.
Minimal reproduction
---
comark: true
---
::ol{style="list-style-type: lower-alpha"}
1. item 1
2. item 2
::
Steps to reproduce the behavior:
- Expected behaviour (comark):
- Open https://comark.dev/play/editor?example=undefined
- Paste the code block above
- Observe that the items are numbered a,b,c.
- With the inspector, observe that the
ol markup is correct.
- Slidev behaviour:
- Open https://sli.dev/new
- Paste the code block above
- Observe that the items are numbered 1,2,3.
- With the inspector, observe that two
ols are nested within one another.
- There is no way to style the correct
ol.
- Save, observe that the file becomes misformatted.
Environment
- Slidev version: v52.14.2
- Browser: Chrome 149.0.7827.115
- OS: macOS
Further notes
This issue is split from the further note of #2639.
Describe the bug
According to the Slidev documentation:
In the Comark documentation, blocks with complex syntax (
ol,ul,table,blockquote,pre) can be styled by wrapping them with identical elements (e.g.::ol)In Slidev, this does not style the element, but rather wraps a new element around it. Additionally, prettier breaks the formatting of this syntax.
Minimal reproduction
Steps to reproduce the behavior:
olmarkup is correct.ols are nested within one another.ol.Environment
Further notes
This issue is split from the further note of #2639.