@forsakringskassan/docs-generator 2.14.1 → 2.14.2

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.
@@ -507,17 +507,16 @@ function codePreview(options) {
507
507
  };
508
508
  function fence(_md, tokens, idx, _options, env) {
509
509
  const { fileInfo } = env;
510
- const { content: rawSource, info, map } = tokens[idx];
510
+ const { content: source, info, map } = tokens[idx];
511
511
  const { language, tags: rawTags } = parseInfostring(info);
512
512
  if (language === "mermaid") {
513
513
  return (
514
514
  /* HTML */
515
515
  `
516
- <pre class="mermaid">${htmlencode(rawSource)}</pre>
516
+ <pre class="mermaid">${htmlencode(source)}</pre>
517
517
  `
518
518
  );
519
519
  }
520
- const source = transformCode(rawSource, language);
521
520
  const example = generateExample({
522
521
  source,
523
522
  language,
@@ -525,9 +524,12 @@ function codePreview(options) {
525
524
  tags: rawTags
526
525
  });
527
526
  const { tags } = example;
528
- const hashContent = `${map?.[0]}:${map?.[1]}:${info}:${source}`;
527
+ const hashContent = `${map?.[0]}:${map?.[1]}:${info}:${example.source}`;
529
528
  const fingerprint = getFingerprint(hashContent);
530
- const highlightedCode = replaceAtLink(highlight(example));
529
+ const transformedCode = transformCode(example.source, example.language);
530
+ const highlightedCode = replaceAtLink(
531
+ highlight({ source: transformedCode, language: example.language })
532
+ );
531
533
  const testId = findTestId(tags);
532
534
  const liveExample = tags.includes("live-example");
533
535
  const staticCode = example.runtime === false || tags.includes("static");
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ var vendor = require('./vendor-Bb38Rlio.js');
6
6
  var path$1 = require('node:path');
7
7
  var require$$1 = require('crypto');
8
8
  require('node:crypto');
9
- var createMarkdownRenderer = require('./create-markdown-renderer-DVss8WXD.js');
9
+ var createMarkdownRenderer = require('./create-markdown-renderer-DeMQ6app.js');
10
10
  var node_child_process = require('node:child_process');
11
11
  var util = require('node:util');
12
12
  var vueDocgenApi = require('vue-docgen-api');
package/dist/markdown.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var createMarkdownRenderer = require('./create-markdown-renderer-DVss8WXD.js');
3
+ var createMarkdownRenderer = require('./create-markdown-renderer-DeMQ6app.js');
4
4
  require('./vendor-Bb38Rlio.js');
5
5
  require('node:url');
6
6
  require('node:path');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/docs-generator",
3
- "version": "2.14.1",
3
+ "version": "2.14.2",
4
4
  "description": "Documentation generator",
5
5
  "keywords": [
6
6
  "documentation"