confluence-md-sync 0.8.3 → 0.8.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.
@@ -582,14 +582,24 @@ class Converter {
582
582
  const grid = trs.map((tr) => elements(tr.children)
583
583
  .filter((c) => c.name === 'td' || c.name === 'th')
584
584
  .map((c) => {
585
+ // Сначала честная конвертация (page-ссылки → {{page:…}}); стрип пустых
586
+ // ac:/ri:-вставок — только если она не удалась (иначе теряются ссылки
587
+ // без текста тела: у них подпись — заголовок страницы).
585
588
  let flat;
586
589
  try {
587
- flat = this.cellFlatten(this.stripEmptyNamespaced(c.children));
590
+ flat = this.cellFlatten(c.children);
588
591
  }
589
592
  catch (e) {
590
593
  if (!(e instanceof Unrepresentable))
591
594
  throw e;
592
- flat = textContent(c.children);
595
+ try {
596
+ flat = this.cellFlatten(this.stripEmptyNamespaced(c.children));
597
+ }
598
+ catch (e2) {
599
+ if (!(e2 instanceof Unrepresentable))
600
+ throw e2;
601
+ flat = textContent(c.children);
602
+ }
593
603
  }
594
604
  return flat.replace(/\s+/g, ' ').trim();
595
605
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "confluence-md-sync",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "Publish Markdown to Confluence (Data Center & Cloud): idempotent page sync, attachment dedup, tables and a pluggable macro system",
5
5
  "keywords": [
6
6
  "confluence",