From 5d79523eba4ec0a89668b904dc7896c843ab8dd6 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 8 Feb 2022 15:03:53 +0100
Subject: refactor(prism): rename color scheme attributes and remove prefix

---
 src/utils/providers/prism.tsx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src/utils/providers/prism.tsx')

diff --git a/src/utils/providers/prism.tsx b/src/utils/providers/prism.tsx
index 840f9d8..7a4221d 100644
--- a/src/utils/providers/prism.tsx
+++ b/src/utils/providers/prism.tsx
@@ -57,7 +57,7 @@ const getTheme = (key: string): PrismTheme | undefined => {
 };
 
 export const PrismThemeProvider: FC<PrismThemeProviderProps> = ({
-  attribute = 'data-prismjs-color-scheme',
+  attribute = 'data-prismjs-color-scheme-current',
   storageKey = 'prismjs-color-scheme',
   themes = ['dark', 'light', 'system'],
   children,
@@ -125,7 +125,6 @@ export const PrismThemeProvider: FC<PrismThemeProviderProps> = ({
         mutations.forEach((record) => {
           var mutatedPre = record.target as HTMLPreElement;
           var newTheme = mutatedPre.getAttribute(attribute) as PrismTheme;
-          console.log('here');
           setPrismTheme(newTheme);
         });
       });
-- 
cgit v1.2.3

