From 26593d0a7a277b73db574ab0db256e3b85642c12 Mon Sep 17 00:00:00 2001 From: Steffen Becker Date: Fri, 28 Aug 2026 10:44:39 +0000 Subject: [PATCH] fix: suppressed cell borders export as w:val="nil", not "none" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nil is the explicit absence that wins every border-conflict rule in Word — a cell's none can still lose against table-level borders there, which kept the black grid over styled tables. LibreOffice reads both alike, and the importer already maps nil to none. --- src/lib/export/docx.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/export/docx.ts b/src/lib/export/docx.ts index 0d8964d..33bfb40 100644 --- a/src/lib/export/docx.ts +++ b/src/lib/export/docx.ts @@ -2039,7 +2039,9 @@ function cellForce(style: TableStyle | undefined, cell: TiptapNode, bg: unknown) return force; } -const noneBorder: IBorderOptions = { style: BorderStyle.NONE, size: 0, color: 'auto' }; +// "nil" is the explicit absence that wins every border-conflict rule in Word — a cell's +// "none" can still lose against table-level borders there; LibreOffice reads both alike. +const noneBorder: IBorderOptions = { style: BorderStyle.NIL, size: 0, color: 'auto' }; function docxCellBorder(attrs: Record | undefined, side: BorderSide, fallback: IBorderOptions = cellBorder): IBorderOptions { const b = parseBorderAttr(attrs?.[side] as string | null);