### Validations - [x] Follow our [Code of Conduct](https://github.com/shikijs/shiki/blob/main/CODE_OF_CONDUCT.md) - [x] Read the [Contributing Guide](https://github.com/shikijs/shiki/blob/main/CONTRIBUTING.md). - [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. ### Describe the bug Follow up on https://github.com/shikijs/shiki/issues/934 Downstream issue: https://github.com/vuejs/vitepress/issues/4729#issuecomment-2848664907 Edit: Probably same as #1006 ````md this doesn't work: ```yaml # foo # [!code ++] [!code focus] ``` this works: ```yaml # foo // [!code ++] [!code focus] ``` this leaves dangling `#` ```yaml foo # bar # [!code ++] [!code focus] ``` ```` <img width="131" alt="Image" src="https://github.com/user-attachments/assets/23eb9f62-85e7-40cf-b34e-76fda0d7789a" /> ### Reproduction https://stackblitz.com/edit/vite-gbsar3e7?file=docs/index.md ### Contributes - [ ] I am willing to submit a PR to fix this issue - [ ] I am willing to submit a PR with failing tests
Validations
Describe the bug
Follow up on #934
Downstream issue: vuejs/vitepress#4729 (comment)
Edit: Probably same as #1006
Reproduction
https://stackblitz.com/edit/vite-gbsar3e7?file=docs/index.md
Contributes