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

Leading whitespace in code blocks breaks all subsequent highlighted codeblocks #1867

Open
EmNudge opened this issue Sep 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@EmNudge
Copy link

EmNudge commented Sep 16, 2024

Describe the bug

If you have a leading white space in a codeblock, it will break the parser such that having subsequent highlighted codeblocks will crash the current slide.

image

This is an issue for assembly which often has leading whitespace. This is also where I encountered this problem.

Minimal reproduction

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

block 1

```
 test
```

block 2

```js
const val = 42
```

Environment

  • Slidev version: 0.49.29
  • Browser: Chrome
  • OS: MacOS
@KermanX KermanX added the bug Something isn't working label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants