@moxn/kb-migrate 0.2.1 → 0.2.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.
- package/dist/export.js +2 -8
- package/package.json +1 -1
package/dist/export.js
CHANGED
|
@@ -10,15 +10,9 @@ import { MoxnClient } from './client.js';
|
|
|
10
10
|
// ──────────────────────────────────────────────
|
|
11
11
|
// Utility functions
|
|
12
12
|
// ──────────────────────────────────────────────
|
|
13
|
-
/** Strip <moxn:comment> tags from text, preserving the inner text.
|
|
13
|
+
/** Strip <moxn:comment> tags from text, preserving the inner text. */
|
|
14
14
|
function stripCommentTags(text) {
|
|
15
|
-
|
|
16
|
-
let result = text;
|
|
17
|
-
// Loop until no more comment tags remain (handles nested/double-wrapped tags from TipTap CRDT)
|
|
18
|
-
while (pattern.test(result)) {
|
|
19
|
-
result = result.replace(pattern, '$1');
|
|
20
|
-
}
|
|
21
|
-
return result;
|
|
15
|
+
return text.replace(/<moxn:comment[^>]*>([\s\S]*?)<\/moxn:comment>/g, '$1');
|
|
22
16
|
}
|
|
23
17
|
/** Derive a local filename from a storage key or URL. */
|
|
24
18
|
function deriveFilename(storageKey, url, fallbackExt) {
|
package/package.json
CHANGED