@forsakringskassan/docs-generator 2.11.1 → 2.11.3

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 +6 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -296,9 +296,13 @@ function findExamples(doc) {
296
296
  const [language, ...tags] = info.split(/\s+/);
297
297
  const hashContent = `${map?.[0]}:${map?.[1]}:${info}:${content}`;
298
298
  const fingerprint = createMarkdownRenderer.getFingerprint(hashContent);
299
+ let extension = void 0;
300
+ if (language === "import") {
301
+ extension = content.split(".").at(-1)?.trim();
302
+ }
299
303
  collected.push({
300
304
  selector: `#example-${fingerprint}`,
301
- language,
305
+ language: extension ?? language,
302
306
  tags
303
307
  });
304
308
  return "";
@@ -439,7 +443,7 @@ function selectableVersionProcessor(pkg, container, options) {
439
443
  src: "src/runtime/select-version.ts",
440
444
  buildOptions: {
441
445
  define: {
442
- __PKG_VERSION__: JSON.stringify(pkg.version),
446
+ __PKG_VERSION__: JSON.stringify(`v${pkg.version}`),
443
447
  __MESSAGE__: JSON.stringify(message)
444
448
  }
445
449
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/docs-generator",
3
- "version": "2.11.1",
3
+ "version": "2.11.3",
4
4
  "description": "Documentation generator",
5
5
  "keywords": [
6
6
  "documentation"