@forsakringskassan/docs-generator 2.35.3 → 2.35.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.
package/dist/markdown.mjs CHANGED
@@ -2,8 +2,8 @@ import { createRequire as $createRequire } from "node:module";
2
2
 
3
3
  const require = $createRequire(import.meta.url);
4
4
 
5
- export { S as SoftError, c as createMarkdownRenderer } from './create-markdown-renderer-gWhxglZr.mjs';
6
- import './vendor-BtGCZQy4.mjs';
5
+ export { S as SoftError, c as createMarkdownRenderer } from './create-markdown-renderer-C3-r8Xp9.mjs';
6
+ import './vendor-Dd3EDAs1.mjs';
7
7
  import 'node:url';
8
8
  import 'node:path';
9
9
  import 'fs';
@@ -16363,6 +16363,18 @@ function createDedent(options) {
16363
16363
  if (escapeSpecialCharacters) {
16364
16364
  result = result.replace(/\\n/g, "\n");
16365
16365
  }
16366
+
16367
+ // Workaround for Bun issue with Unicode characters
16368
+ // https://github.com/oven-sh/bun/issues/8745
16369
+ if (typeof Bun !== "undefined") {
16370
+ result = result.replace(
16371
+ // Matches e.g. \\u{1f60a} or \\u5F1F
16372
+ /\\u(?:\{([\da-fA-F]{1,6})\}|([\da-fA-F]{4}))/g, (_, braced, unbraced) => {
16373
+ var _ref;
16374
+ const hex = (_ref = braced !== null && braced !== void 0 ? braced : unbraced) !== null && _ref !== void 0 ? _ref : "";
16375
+ return String.fromCodePoint(parseInt(hex, 16));
16376
+ });
16377
+ }
16366
16378
  return result;
16367
16379
  }
16368
16380
  }
@@ -22955,15 +22967,20 @@ function requireCopy$1 () {
22955
22967
  if (opts.dereference) {
22956
22968
  resolvedDest = path.resolve(process.cwd(), resolvedDest);
22957
22969
  }
22958
- if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
22959
- throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
22960
- }
22970
+ // If both symlinks resolve to the same target, they are still distinct symlinks
22971
+ // that can be copied/overwritten. Only check subdirectory constraints when
22972
+ // the resolved paths are different.
22973
+ if (resolvedSrc !== resolvedDest) {
22974
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
22975
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
22976
+ }
22961
22977
 
22962
- // do not copy if src is a subdir of dest since unlinking
22963
- // dest in this case would result in removing src contents
22964
- // and therefore a broken symlink would be created.
22965
- if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
22966
- throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
22978
+ // do not copy if src is a subdir of dest since unlinking
22979
+ // dest in this case would result in removing src contents
22980
+ // and therefore a broken symlink would be created.
22981
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
22982
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
22983
+ }
22967
22984
  }
22968
22985
 
22969
22986
  // copy the link
@@ -23131,15 +23148,20 @@ function requireCopySync () {
23131
23148
  if (opts.dereference) {
23132
23149
  resolvedDest = path.resolve(process.cwd(), resolvedDest);
23133
23150
  }
23134
- if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
23135
- throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
23136
- }
23151
+ // If both symlinks resolve to the same target, they are still distinct symlinks
23152
+ // that can be copied/overwritten. Only check subdirectory constraints when
23153
+ // the resolved paths are different.
23154
+ if (resolvedSrc !== resolvedDest) {
23155
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
23156
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
23157
+ }
23137
23158
 
23138
- // prevent copy if src is a subdir of dest since unlinking
23139
- // dest in this case would result in removing src contents
23140
- // and therefore a broken symlink would be created.
23141
- if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
23142
- throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
23159
+ // prevent copy if src is a subdir of dest since unlinking
23160
+ // dest in this case would result in removing src contents
23161
+ // and therefore a broken symlink would be created.
23162
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
23163
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
23164
+ }
23143
23165
  }
23144
23166
  return copyLink(resolvedSrc, dest)
23145
23167
  }
@@ -56337,4 +56359,4 @@ var srcExports = requireSrc();
56337
56359
  var tinylr = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
56338
56360
 
56339
56361
  export { HighlightJS as H, MarkdownIt as M, deflist_plugin as a, closest as b, createTwoFilesPatch as c, dedent as d, distance as e, fm as f, globSync as g, glob as h, isCI as i, moduleImporter as j, cliProgress as k, createInstance as l, minimatch as m, fse as n, inter as o, tinylr as t, watch$1 as w };
56340
- //# sourceMappingURL=vendor-BtGCZQy4.mjs.map
56362
+ //# sourceMappingURL=vendor-Dd3EDAs1.mjs.map