Skip to content

[Bug]: Indents are removed in code blocks inside tabs #40

@bbbonnibel

Description

@bbbonnibel

docmd version

0.3.8

Node.js version

v24.13.0

OS/Browser

Windows / Edge

Description

When a code block is placed inside a tab, indents in the code block are all removed.

As a consequence of this, I cannot present a tab structure where one tab is the code snippet, and the other is it running. That means this is impossible:

::: tabs
== tab Code
```html
<div>
    (stuff!)
</div>
```
== tab View
<div>
    (stuff!)
</div>
:::

Steps to Reproduce

✅ Reproducible locally.
✅ Reproducible in the live editor.

Put this snippet in a DocMD page:

::: tabs
== tab Tab
Normal prose

```html
<div>
    <div>
        <div>deepest</div>
    </div>
</div>
```
:::
Image

Expected Behavior

Indents should be left intact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions