Skip to content

A margin exists between the tabs and the actual code when code groups are used in custom blocks #5099

@sapphi-red

Description

@sapphi-red

Describe the bug

::::info

::: code-group

```js [foo.js]
console.log('foo')
```

:::

::::
Image

Reproduction

https://stackblitz.com/edit/vite-jlmcekec?file=docs%2Fexample.md

Expected behavior

Image

The margin to not exist.

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vitepress: ^2.0.0-alpha => 2.0.0-alpha.15

Additional context

It is caused by this line. But I'm not sure the purpose of this line.

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    themeRelated to the theme

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions