confluence-md-sync 0.8.6 → 0.8.7

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.
@@ -680,11 +680,14 @@ class Converter {
680
680
  }
681
681
  // ── Списки ───────────────────────────────────────────────────────────
682
682
  listToMd(list) {
683
- if (list.attrs.some(([k]) => !(list.name === 'ol' && k === 'start'))) {
683
+ // readable-режим отбрасывает оформление, поэтому презентационные атрибуты
684
+ // (class/style, напр. вставленный ds-markdown/code-line) на списке и его
685
+ // пунктах игнорируются — список всё равно превращается в чистый markdown.
686
+ if (!this.readable && list.attrs.some(([k]) => !(list.name === 'ol' && k === 'start'))) {
684
687
  throw new Unrepresentable();
685
688
  }
686
689
  const items = list.children.filter((n) => !(n.kind === 'text' && /^[ \t\r\n]*$/.test(n.raw)));
687
- if (!items.every((n) => n.kind === 'el' && n.name === 'li' && n.attrs.length === 0)) {
690
+ if (!items.every((n) => n.kind === 'el' && n.name === 'li' && (this.readable || n.attrs.length === 0))) {
688
691
  throw new Unrepresentable();
689
692
  }
690
693
  const lis = items;
@@ -733,7 +736,7 @@ class Converter {
733
736
  flushInline();
734
737
  lines.push(...this.listToMd(part).split('\n'));
735
738
  }
736
- else if (part.kind === 'el' && part.name === 'p' && part.attrs.length === 0) {
739
+ else if (part.kind === 'el' && part.name === 'p' && (this.readable || part.attrs.length === 0)) {
737
740
  if (!loose)
738
741
  throw new Unrepresentable();
739
742
  if (lines.length > 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "confluence-md-sync",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
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",