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.
Files changed (2) hide show
  1. package/index.ts +7 -4
  2. 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
- // Apply sensible defaults for shikiConfig only when the user hasn't
71
- // already set those specific keys.
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 shikiDefaults: any = { theme: shikiTheme, wrap: true };
74
- const mergedShikiConfig = { ...shikiDefaults, ...existingShikiConfig };
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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jaamd",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Just Another Astro Markdown",
5
5
  "type": "module",
6
6
  "license": "MIT",