PrismJS / prism

Lightweight, robust, elegant syntax highlighting.
https://prismjs.com
MIT License
12.34k stars 1.29k forks source link

Type of language doesn't always show on website #3840

Closed cnachtigall1991 closed 3 weeks ago

cnachtigall1991 commented 3 weeks ago

Information:

Description I implemented a Vue Component to use PrismJS. In the screenshot below you see that on the 'scss' snippet it shows that the code is in 'scss' but on all the other snippets there is nothing.

Example Code for PrismJS integration: https://somegit.dev/nachtigall.dev/nachtigall.dev/src/branch/main/src/composables/Markup.vue

Code using the implementation: https://somegit.dev/nachtigall.dev/nachtigall.dev/src/branch/main/src/pages/components/index.vue

Live-Example: https://nachtigall.dev/components/

Screenshot 2024-10-29 at 17-38-00 nachtigall dev

Golmote commented 3 weeks ago

Hello, this is an issue in your CSS.

For SCSS, you added the ::after on the code element. Whereas for the others, you used pre. https://somegit.dev/nachtigall.dev/nachtigall.dev/src/branch/main/src/composables/Markup.vue#L182

cnachtigall1991 commented 3 weeks ago

Hey, oh boy, I have looked all over the place and didn't see that..

Sometimes you don't see the picture if you are too close. :D

Thanks a lot!