jaamd 0.1.11 → 0.1.12
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/index.ts +7 -4
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -67,11 +67,14 @@ export default function jaamd(options: JaamdOptions = {}): AstroIntegration {
|
|
|
67
67
|
const existingRemarkPlugins: any[] = existingMarkdown.remarkPlugins ?? [];
|
|
68
68
|
const existingShikiConfig: any = existingMarkdown.shikiConfig ?? {};
|
|
69
69
|
|
|
70
|
-
//
|
|
71
|
-
//
|
|
70
|
+
// Build shikiConfig: jaamd values are true defaults
|
|
71
|
+
// only apply when the key is absent (undefined).
|
|
72
|
+
// If the user (or a prior integration) already set a key,
|
|
73
|
+
// that value is preserved as-is.
|
|
72
74
|
const shikiTheme = theme === "dark" ? "github-dark" : "github-light";
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
+
const mergedShikiConfig: any = { ...existingShikiConfig };
|
|
76
|
+
if (mergedShikiConfig.theme === undefined) mergedShikiConfig.theme = shikiTheme;
|
|
77
|
+
if (mergedShikiConfig.wrap === undefined) mergedShikiConfig.wrap = true;
|
|
75
78
|
|
|
76
79
|
updateConfig({
|
|
77
80
|
vite: {
|