content
content copied to clipboard
Syntax highlight breaks
Environment
/
Reproduction
check https://github.com/unjs/website as a reference.
This PR breaks syntax highlight https://github.com/unjs/website/pull/160
Describe the bug
see title
Additional context
No response
Logs
No response
I think latest deps should have not this issue anymore.
@pi0
I think there are still some issues with highlighting. It doesn't seem to be working.
I took this example from the nuxt content website. (Maybe it's not highlighting in this case because of a wrong configuration of the code block -> js [file.js]{4-6,7} meta-info=val but there are only 3 lines.
You can notice that lines are not highlighted nor classes are added to the code block.
I also created a repro with the Nuxt documentation template, it does add classes but styling is missing. (I will push this repo a bit later)
I added this as the nuxt.config.ts content entry
content: {
highlight: {
// Theme used in all color schemes.
// OR
theme: {
// Default theme (same as single string)
default: 'github-light',
// Theme used if `html.dark`
dark: 'github-dark'
}
}
}
Here's the result of the code block, as you can see, the classes are added but css is missing.
Any help would be appreciated on this. p.s. I'm also using latest Shiki 1.6.1
@trc-mathieu some classes are missing, I'll make a new issue with proper reproduction. If you need a quick, temporary solution use styles below but please wait for the fix from the authors.
https://gist.github.com/nandordudas/a8487d89e212c9963b0433b3b073e027
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.