Re-enable `flourite` with Safari/FF fix, bump deps, fixes #64

This commit is contained in:
Niek van der Maas 2023-03-22 11:33:25 +01:00
parent 1d6791cc3c
commit b701c7e74b
3 changed files with 13 additions and 14 deletions

20
package-lock.json generated
View File

@ -20,7 +20,7 @@
"copy-to-clipboard": "^3.3.3",
"eslint-config-standard-with-typescript": "^34.0.1",
"eslint-plugin-svelte3": "^4.0.0",
"flourite": "^1.2.2",
"flourite": "^1.2.3",
"postcss": "^8.4.21",
"sass": "^1.59.2",
"svelte": "^3.55.1",
@ -2210,9 +2210,9 @@
"peer": true
},
"node_modules/flourite": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/flourite/-/flourite-1.2.2.tgz",
"integrity": "sha512-eSRUyfKaJ0dyyas8GOQEqwYCcBymfjS+bMgzQAq2rA6jCbkeCm7upT8o5HmBT3SILzslzeUqEvjak1MjJY+NrA==",
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/flourite/-/flourite-1.2.3.tgz",
"integrity": "sha512-iGoOmc4EcfYpWSY71LGMf+3BbQ2xbeIXoKbafGqghuEOK7PCZ0i8oxcMYFBIdM+vtgPmAV0ktA3b492yXjwyQA==",
"dev": true,
"funding": {
"url": "https://saweria.co/teknologiumum"
@ -2884,9 +2884,9 @@
"peer": true
},
"node_modules/js-sdsl": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz",
"integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==",
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz",
"integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==",
"dev": true,
"peer": true,
"funding": {
@ -3005,9 +3005,9 @@
}
},
"node_modules/marked": {
"version": "4.2.12",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.12.tgz",
"integrity": "sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw==",
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
"dev": true,
"bin": {
"marked": "bin/marked.js"

View File

@ -26,7 +26,7 @@
"copy-to-clipboard": "^3.3.3",
"eslint-config-standard-with-typescript": "^34.0.1",
"eslint-plugin-svelte3": "^4.0.0",
"flourite": "^1.2.2",
"flourite": "^1.2.3",
"postcss": "^8.4.21",
"sass": "^1.59.2",
"svelte": "^3.55.1",

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Highlight } from 'svelte-highlight'
// import flourite from 'flourite'
import flourite from 'flourite'
// Import both dark and light styles
import { github, githubDark } from 'svelte-highlight/styles'
@ -38,8 +38,7 @@
// If no language is set, try to detect it using flourite
if (!lang) {
// lang = flourite(text, { shiki: true }).language
// TODO: re-enable this once https://github.com/teknologi-umum/flourite/pull/75 is merged
lang = flourite(text, { shiki: true }).language
}
switch (lang) {