confluence-cli 1.34.0 → 1.35.0
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/lib/macro-converter.js +16 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/lib/macro-converter.js
CHANGED
|
@@ -261,6 +261,14 @@ class MacroConverter {
|
|
|
261
261
|
return `[!note]\n${cleanContent}`;
|
|
262
262
|
});
|
|
263
263
|
|
|
264
|
+
// anchor macro → **ANCHOR: id** marker (round-trip with markdownToStorage).
|
|
265
|
+
// Must run before the generic <ac:structured-macro> catch-all below, which
|
|
266
|
+
// would otherwise drop the anchor entirely.
|
|
267
|
+
markdown = markdown.replace(
|
|
268
|
+
/<ac:structured-macro ac:name="anchor"[^>]*>[\s\S]*?<ac:parameter ac:name="">([\s\S]*?)<\/ac:parameter>[\s\S]*?<\/ac:structured-macro>/g,
|
|
269
|
+
'\n**ANCHOR: $1**\n'
|
|
270
|
+
);
|
|
271
|
+
|
|
264
272
|
markdown = markdown.replace(/<ac:task-list>([\s\S]*?)<\/ac:task-list>/g, (_, content) => {
|
|
265
273
|
const tasks = [];
|
|
266
274
|
const taskRegex = /<ac:task>[\s\S]*?<ac:task-status>([^<]*)<\/ac:task-status>[\s\S]*?<ac:task-body>([\s\S]*?)<\/ac:task-body>[\s\S]*?<\/ac:task>/g;
|
|
@@ -317,6 +325,14 @@ class MacroConverter {
|
|
|
317
325
|
|
|
318
326
|
markdown = markdown.replace(/<ac:structured-macro[^>]*>[\s\S]*?<\/ac:structured-macro>/g, '');
|
|
319
327
|
|
|
328
|
+
// ac:link with ac:anchor → [text](#id) (round-trip with markdownToStorage).
|
|
329
|
+
// Must run before the <ac:link[^>]*>…</ac:link> catch-all below, which
|
|
330
|
+
// would otherwise drop the anchor link entirely.
|
|
331
|
+
markdown = markdown.replace(
|
|
332
|
+
/<ac:link ac:anchor="([^"]*)">\s*<ac:plain-text-link-body><!\[CDATA\[([\s\S]*?)\]\]><\/ac:plain-text-link-body>\s*<\/ac:link>/g,
|
|
333
|
+
'[$2](#$1)'
|
|
334
|
+
);
|
|
335
|
+
|
|
320
336
|
markdown = markdown.replace(/<ac:link><ri:url ri:value="([^"]*)" \/><ac:plain-text-link-body><!\[CDATA\[([^\]]*)\]\]><\/ac:plain-text-link-body><\/ac:link>/g, '[$2]($1)');
|
|
321
337
|
|
|
322
338
|
markdown = markdown.replace(/<ac:link>\s*<ri:page[^>]*ri:content-title="([^"]*)"[^>]*\/>\s*<\/ac:link>/g, '[$1]');
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "confluence-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "confluence-cli",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.35.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"axios": "^1.15.0",
|