From f18a95486ef20aa2ec3e885563d16c842a1bbeb2 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Mon, 4 May 2026 11:32:28 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Improve=20DOCX=20rendering?= =?UTF-8?q?=20and=20surface=20filename=20in=20panel=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two UX improvements based on hands-on use of the office preview pipeline. DOCX rendering — mammoth strips the navy banners, cell shading, and column layouts that direct-formatted docs apply (python-docx-style output is a common case). The flat `

X

` and bare `` (mammoth never emits ``), adds zebra striping, and treats the python-docx `

X

` section-heading idiom as a pseudo-h2 with a thin accent left border so document structure survives the round trip. Headings get a left accent or underline so they read as headings instead of just bold paragraphs. - Sanitizer's `allowedAttributes` opens `class` on the heading and block tags the styleMap and CSS heuristics rely on. `
` it emits looks washed out next to the source. Three targeted compensations: - Style map promotes `Title`, `Subtitle`, `Heading 1` thru `Heading 6`, and `Quote` paragraphs to their semantic HTML equivalents (mammoth's default only handles Heading 1-6, missing Title/Subtitle/Quote). - Extra CSS scoped to `.lc-docx` gives the first table row sticky- looking header styling regardless of `