@mdsvex/language-core 0.1.0-next.2 → 0.1.0-next.4

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/dist/index.js +16 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -99,8 +99,11 @@ function document_options(manifest, doc) {
99
99
  highlight: highlight_of(manifest)
100
100
  };
101
101
  if (Object.keys(templates).length !== 0) compile.templates = templates;
102
+ const claims = claims_of(manifest);
103
+ if (claims !== void 0) compile.plugins = claims;
102
104
  if (manifest.unwrap_images === true) compile.unwrap_images = true;
103
- if (manifest.import_images === true) compile.import_images = true;
105
+ if (manifest.import_images === true)
106
+ compile.import_images = manifest.enhanced_images === true ? { enhanced: true } : true;
104
107
  if (manifest.heading_ids === true) compile.heading_ids = true;
105
108
  const smart = smart_from_json(manifest.smart_punctuation);
106
109
  if (smart !== void 0) compile.smart_punctuation = smart;
@@ -123,6 +126,18 @@ function document_options(manifest, doc) {
123
126
  report_missing_pre: true
124
127
  };
125
128
  }
129
+ const claimed = /* @__PURE__ */ new WeakMap();
130
+ function claims_of(manifest) {
131
+ let out = claimed.get(manifest);
132
+ if (out === void 0) {
133
+ out = [];
134
+ for (const p of manifest.plugins ?? [])
135
+ if (p.fences !== void 0 && p.fences.length !== 0)
136
+ out.push({ name: p.name, fences: p.fences });
137
+ claimed.set(manifest, out);
138
+ }
139
+ return out.length === 0 ? void 0 : out;
140
+ }
126
141
  let twinkleplop = null;
127
142
  function highlight_of(manifest) {
128
143
  if ((manifest.highlight ?? "twinkleplop") !== "twinkleplop") return void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdsvex/language-core",
3
- "version": "0.1.0-next.2",
3
+ "version": "0.1.0-next.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/pngwn/MDsveX.git",
@@ -23,9 +23,9 @@
23
23
  "@volar/typescript": "^2.4.28",
24
24
  "svelte2tsx": "^0.7.53",
25
25
  "temml": "^0.14.0",
26
- "@mdsvex/render": "1.0.0-next.2",
27
- "@mdsvex/source-map": "0.1.0-next.2",
28
- "mdsvex": "1.0.0-next.2"
26
+ "@mdsvex/render": "1.0.0-next.4",
27
+ "@mdsvex/source-map": "0.1.0-next.4",
28
+ "mdsvex": "1.0.0-next.4"
29
29
  },
30
30
  "devDependencies": {
31
31
  "svelte": "^5.0.0",