Skip to content

Commit ae98a29

Browse files
Merge branch 'kymtwyf-main'
2 parents 434a238 + bbe9575 commit ae98a29

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# Change Log
22
All notable changes to the "vue-code-block" plugin will be documented in this file.
33

4+
## v2.3.3
5+
03-13-2024
6+
[main] (@kymtwyf)
7+
* Fix cssPath prop not being reactive. Fixes [#49](https://github.com/webdevnerdstuff/vue-code-block/issues/49)
8+
49
## v2.3.2
5-
13-03-2024
10+
03-13-2024
611
[main] (@webdevnerdstuff)
712
* Change component to use `defineAsyncComponent`
813

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wdns/vue-code-block",
3-
"version": "2.3.2",
3+
"version": "2.3.3",
44
"description": "Vue 3 CodeBlock - Highlight your code with ease using this syntax highlighting component powered by PrismJS or Highlight.js.",
55
"private": false,
66
"publishConfig": {

src/plugin/VCodeBlock.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ const renderedCode = ref('');
184184
const runTextValue = ref<string>('');
185185
const useTheme = ref<boolean | string>('');
186186
187-
const { copyButton, copyIcons, copyTab, cssPath, label, runTab, tabs } = toRefs(settings.value);
187+
const { copyButton, copyIcons, copyTab, label, runTab, tabs } = toRefs(settings.value);
188188
189189
190190
// -------------------------------------------------- Computed //
@@ -297,10 +297,7 @@ watch(props as Props, () => {
297297
if (settings.value.runText) {
298298
runTextValue.value = settings.value.runText;
299299
}
300-
});
301300
302-
watch(() => cssPath, () => {
303-
loadTheme();
304301
});
305302
306303
@@ -438,8 +435,8 @@ function loadTheme(): void {
438435
439436
const adjustCssFilename = themeNameAdjustments(activeLibrary, useTheme.value);
440437
441-
if (typeof cssPath.value !== 'undefined') {
442-
fetchUrl = cssPath.value;
438+
if (typeof settings.value.cssPath !== 'undefined') {
439+
fetchUrl = settings.value.cssPath;
443440
}
444441
else {
445442
switch (activeLibrary) {

0 commit comments

Comments
 (0)