@forsakringskassan/docs-generator 2.26.2 → 2.26.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/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -376,10 +376,14 @@ function extractExamplesProcessor(options) {
|
|
|
376
376
|
const md$4 = vendor.MarkdownIt();
|
|
377
377
|
md$4.renderer.rules.fence = (tokens, idx, _options, collected) => {
|
|
378
378
|
const { content, info, map } = tokens[idx];
|
|
379
|
-
const { language, tags } = createMarkdownRenderer.parseInfostring(info);
|
|
379
|
+
const { language: rawLanguage, tags } = createMarkdownRenderer.parseInfostring(info);
|
|
380
380
|
const hashContent = `${map?.[0]}:${map?.[1]}:${info}:${content}`;
|
|
381
381
|
const fingerprint = createMarkdownRenderer.getFingerprint(hashContent);
|
|
382
382
|
let extension = void 0;
|
|
383
|
+
let language = rawLanguage;
|
|
384
|
+
if (createMarkdownRenderer.hasTag(tags, "compare")) {
|
|
385
|
+
language = "diff";
|
|
386
|
+
}
|
|
383
387
|
if (language === "import") {
|
|
384
388
|
extension = content.split(".").at(-1)?.trim();
|
|
385
389
|
}
|