diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-02-13 17:27:53 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-02-13 17:27:53 +0100 |
| commit | e83d13bbbe4a7d19371a5be6782bd592a6ee7406 (patch) | |
| tree | 86f4c8e2b70fb75ccc2f3ad3237e913968596995 | |
| parent | 45e4e10f4c7b818e83f6f7ab0255206e90f55851 (diff) | |
fix: switch prism theme on single article
I forgot to change the selector to query all code blocks.
| -rw-r--r-- | src/pages/article/[slug].tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pages/article/[slug].tsx b/src/pages/article/[slug].tsx index a45cbc9..7bde448 100644 --- a/src/pages/article/[slug].tsx +++ b/src/pages/article/[slug].tsx @@ -38,7 +38,7 @@ const SingleArticle: NextPageWithLayout<ArticleProps> = ({ post }) => { useEffect(() => { const allPre: NodeListOf<HTMLPreElement> = document.querySelectorAll( - 'pre[data-prismjs-color-scheme' + 'pre[data-prismjs-color-scheme-current]' ); setCodeBlocks(allPre); }, [setCodeBlocks, router.asPath]); |
