Skip to content

Comark block attributes are not supported #2639

Description

@c-harding

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 can be styled by adding a space at the end, and then curly braces.

In Slidev, this does not style the block, but rather the last attribute.

Minimal reproduction

---
comark: true
---

## h2 with _italic_ {style="color: blue"}

The whole line should be blue, not just the italic text.

Steps to reproduce the behavior:

  1. Expected behaviour (comark):
    1. Open https://comark.dev/play/editor?example=undefined
    2. Paste the code block above
    3. Observe that the entire line is blue.
  2. Slidev behaviour:
    1. Open https://sli.dev/new
    2. Paste the code block above
    3. Observe that only the italic text is blue.
    4. There is no way to style the entire line.

https://stackblitz.com/edit/github-mvd3wqut?file=slides.md

Environment

  • Slidev version: v52.14.2
  • Browser: Chrome 149.0.7827.115
  • OS: macOS

Further notes

Additionally, wrapping a list, table, blockquote, or code block does not work

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions