confluence-cli 1.27.3 → 1.27.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.
@@ -1293,12 +1293,12 @@ class ConfluenceClient {
1293
1293
 
1294
1294
  // Convert Confluence code macros to markdown
1295
1295
  markdown = markdown.replace(/<ac:structured-macro ac:name="code"[^>]*>[\s\S]*?<ac:parameter ac:name="language">([^<]*)<\/ac:parameter>[\s\S]*?<ac:plain-text-body><!\[CDATA\[([\s\S]*?)\]\]><\/ac:plain-text-body>[\s\S]*?<\/ac:structured-macro>/g, (_, lang, code) => {
1296
- return `\`\`\`${lang}\n${code}\n\`\`\``;
1296
+ return `\n\`\`\`${lang}\n${code}\n\`\`\`\n`;
1297
1297
  });
1298
1298
 
1299
1299
  // Convert code macros without language parameter
1300
1300
  markdown = markdown.replace(/<ac:structured-macro ac:name="code"[^>]*>[\s\S]*?<ac:plain-text-body><!\[CDATA\[([\s\S]*?)\]\]><\/ac:plain-text-body>[\s\S]*?<\/ac:structured-macro>/g, (_, code) => {
1301
- return `\`\`\`\n${code}\n\`\`\``;
1301
+ return `\n\`\`\`\n${code}\n\`\`\`\n`;
1302
1302
  });
1303
1303
 
1304
1304
  // Convert info macro to admonition
@@ -1515,8 +1515,8 @@ class ConfluenceClient {
1515
1515
  });
1516
1516
 
1517
1517
  // Convert paragraphs (after lists and tables)
1518
- markdown = markdown.replace(/<p>(.*?)<\/p>/g, (_, content) => {
1519
- return content.trim() + '\n';
1518
+ markdown = markdown.replace(/<p>(.*?)<\/p>/gs, (_, content) => {
1519
+ return '\n' + content.trim() + '\n';
1520
1520
  });
1521
1521
 
1522
1522
  // Convert line breaks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "confluence-cli",
3
- "version": "1.27.3",
3
+ "version": "1.27.4",
4
4
  "description": "A command-line interface for Atlassian Confluence with page creation and editing capabilities",
5
5
  "main": "index.js",
6
6
  "bin": {