aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/shikiCodeblocks
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/shikiCodeblocks')
-rw-r--r--src/plugins/shikiCodeblocks/index.ts6
-rw-r--r--src/plugins/shikiCodeblocks/shiki.css (renamed from src/plugins/shikiCodeblocks/style.css)9
2 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/shikiCodeblocks/index.ts b/src/plugins/shikiCodeblocks/index.ts
index fd6b04b..58e0048 100644
--- a/src/plugins/shikiCodeblocks/index.ts
+++ b/src/plugins/shikiCodeblocks/index.ts
@@ -22,7 +22,7 @@ import { wordsFromPascal, wordsToTitle } from "@utils/text";
import definePlugin, { OptionType } from "@utils/types";
import previewExampleText from "~fileContent/previewExample.tsx";
-import cssText from "~fileContent/style.css";
+import cssText from "~fileContent/shiki.css";
import { Settings } from "../../Vencord";
import { shiki } from "./api/shiki";
@@ -44,8 +44,8 @@ export default definePlugin({
{
find: "codeBlock:{react:function",
replacement: {
- match: /codeBlock:\{react:function\((.),(.),(.)\)\{/,
- replace: "$&return Vencord.Plugins.plugins.ShikiCodeblocks.renderHighlighter($1,$2,$3);",
+ match: /codeBlock:\{react:function\((\i),(\i),(\i)\)\{/,
+ replace: "$&return $self.renderHighlighter($1,$2,$3);",
},
},
],
diff --git a/src/plugins/shikiCodeblocks/style.css b/src/plugins/shikiCodeblocks/shiki.css
index b246db4..b871d99 100644
--- a/src/plugins/shikiCodeblocks/style.css
+++ b/src/plugins/shikiCodeblocks/shiki.css
@@ -1,10 +1,13 @@
-.shiki-root {
- border-radius: 4px;
-
+.shiki-container {
+ border: 4px;
/* fallback background */
background-color: var(--background-secondary);
}
+.shiki-root {
+ border-radius: 4px;
+}
+
.shiki-root code {
display: block;
overflow-x: auto;