Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The layout of vue-html code block in line number mode #1105

Closed
3 tasks done
Jinjiang opened this issue Aug 3, 2022 · 0 comments · Fixed by #1108
Closed
3 tasks done

The layout of vue-html code block in line number mode #1105

Jinjiang opened this issue Aug 3, 2022 · 0 comments · Fixed by #1108
Labels
bug Something isn't working build Related to the build system

Comments

@Jinjiang
Copy link
Member

Jinjiang commented Aug 3, 2022

Describe the bug

I found in vue-html code blocks + line number mode, there is no line-numbers-mode CSS class on the div wrapper, which leads to the layout bug like below:

image

image

Reproduction

index.md:

\```html
<div id="event-handling">
  <p>{{ message }}</p>
  <button v-on:click="reverseMessage">Reverse Message</button>
</div>
\```

\```vue-html
<div id="event-handling">
  <p>{{ message }}</p>
  <button v-on:click="reverseMessage">Reverse Message</button>
</div>
\```

.vitepress/config.js:

module.exports = () => ({
  markdown: {
    lineNumbers: true
  }
})

Expected behavior

By manually adding the CSS class in devtools, it goes normal.

image

image

System Info

System:
    OS: macOS 13.0
    CPU: (8) arm64 Apple M1
    Memory: 130.56 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
    Yarn: 1.22.18 - ~/.yarn/bin/yarn
    npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
  Browsers:
    Chrome: 103.0.5060.134
    Safari: 16.0
  npmPackages:
    vitepress: 1.0.0-alpha.4 => 1.0.0-alpha.4

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@Jinjiang Jinjiang added the bug: pending triage Maybe a bug, waiting for confirmation label Aug 3, 2022
@brc-dd brc-dd added bug Something isn't working and removed bug: pending triage Maybe a bug, waiting for confirmation labels Aug 3, 2022
@brc-dd brc-dd linked a pull request Aug 3, 2022 that will close this issue
@brc-dd brc-dd added the build Related to the build system label Aug 3, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working build Related to the build system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants