Skip to content

Commit

Permalink
Prism mostly working well
Browse files Browse the repository at this point in the history
  • Loading branch information
morehawes committed Feb 18, 2024
1 parent fcec4fd commit 58009e7
Show file tree
Hide file tree
Showing 5 changed files with 590 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/assets/prism.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pre[class*="language-"],
code[class*="language-"],
pre[class*="language-"] *,
code[class*="language-"] * {
white-space: pre-wrap;
margin-bottom: 10px;
z-index: 0;
background: #222 !important;
Expand Down
12 changes: 12 additions & 0 deletions docs/components/Content.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<script setup>
onMounted(() => {
setTimeout(() => {
//Iterate over each .remark-highlight .token.comment element
document.querySelectorAll("span.token.comment").forEach((el) => {
// Add newline
el.innerHTML += "\n";
});
}, 200);
});
</script>

<template>
<main>
<article>
Expand Down
3 changes: 2 additions & 1 deletion docs/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default defineNuxtConfig({
markdown: {
remarkPlugins: {
"remark-gfm": true,
"remark-prism": true,
},
},
},
Expand All @@ -15,7 +16,7 @@ export default defineNuxtConfig({
"~/assets/main.less",
"github-markdown-css/github-markdown-light.css",
// "prism-theme-github/themes/prism-theme-github-dark.css",
// "~/assets/prism.css",
"~/assets/prism.css",
],

app: {
Expand Down
Loading

0 comments on commit 58009e7

Please sign in to comment.