@forsakringskassan/docs-generator 2.11.2 → 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.
- package/dist/index.js +5 -1
- 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 "";
|