svelte-prism-action 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/package.json +1 -1
- package/src/actions/svelte-prism-action.js +4 -4
package/README.md
CHANGED
|
@@ -83,6 +83,10 @@ You can also change the IntersectionObserver options. For more information on wh
|
|
|
83
83
|
|
|
84
84
|
## Changelog
|
|
85
85
|
|
|
86
|
+
### 1.1.2 (2023-03-16)
|
|
87
|
+
|
|
88
|
+
- Fix: highlight fails when `prism-markup.js` import not finished
|
|
89
|
+
|
|
86
90
|
### 1.1.1 (2023-03-15)
|
|
87
91
|
|
|
88
92
|
- Fix: SvelteKit error while loading prism-markup.js
|
package/package.json
CHANGED
|
@@ -136,13 +136,13 @@ export function prism(node, params) {
|
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
//load markup component, is needed for all languages
|
|
140
|
-
import(/* @vite-ignore */ "prismjs/components/prism-markup");
|
|
141
|
-
|
|
142
139
|
//wait for onMount on parent
|
|
143
140
|
let observer;
|
|
144
141
|
|
|
145
|
-
tick().then(() => {
|
|
142
|
+
tick().then(async () => {
|
|
143
|
+
//load markup component, is needed for all languages
|
|
144
|
+
await import(/* @vite-ignore */ "prismjs/components/prism-markup");
|
|
145
|
+
|
|
146
146
|
//add observer to code blocks
|
|
147
147
|
const codeblocks = node.querySelectorAll("code");
|
|
148
148
|
observer = new IntersectionObserver(onIntersect, { ...options });
|