confluence-cli 2.1.9 → 2.1.10

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.
@@ -281,19 +281,23 @@ class StorageWalker {
281
281
 
282
282
  handleAnchor(node) {
283
283
  const param = this.findParamByName(node, '');
284
- const id = param ? this.getTextContent(param) : '';
284
+ const id = (param ? this.getTextContent(param) : '').trim();
285
+ if (!id) return '';
285
286
  return `\n**ANCHOR: ${id}**\n`;
286
287
  }
287
288
 
288
289
  handlePanel(node) {
289
290
  const titleParam = this.findParamByName(node, 'title');
290
- const title = titleParam ? this.getTextContent(titleParam) : '';
291
+ const title = (titleParam ? this.getTextContent(titleParam) : '').trim();
291
292
  const body = this.getMacroBody(node);
292
293
  // Trim before quoting — walkNodes wraps every <p> with a leading and
293
294
  // trailing \n, so untrimmed body splits into ['', 'body', ''] and emits
294
295
  // extra `>` blank lines that bracket the real content.
295
296
  const cleanContent = this.walkNodes(body).trim();
297
+ if (!title && !cleanContent) return '';
296
298
  const quoted = cleanContent.split('\n').map((line) => (line ? `> ${line}` : '>')).join('\n');
299
+ if (!title) return `\n${quoted}\n`;
300
+ if (!cleanContent) return `\n> **${title}**\n`;
297
301
  return `\n> **${title}**\n>\n${quoted}\n`;
298
302
  }
299
303
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "confluence-cli",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "confluence-cli",
9
- "version": "2.1.9",
9
+ "version": "2.1.10",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "axios": "^1.15.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "confluence-cli",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "description": "A command-line interface for Atlassian Confluence with page creation and editing capabilities",
5
5
  "main": "index.js",
6
6
  "bin": {