v7.7.0: 🎯 Round-Trip Fidelity for Rich-Text Editors + Syntax-Typed Markdown Dialects
I am pleased to announce the release of officeParser v7.7.0! This release hardens the Markdown ↔ HTML round trip for the kind of rich content a ProseMirror/Tiptap-style editor produces. Nested lists, aligned tables, highlights, and link/image titles now survive a full md → HTML → md cycle. It also reworks the Markdown dialect configuration so every capability is named by the syntax it selects instead of a product flavor or a bare boolean.
The fidelity items are corrections: the only output that moves is content that was previously flattened, dropped, or emitted as invalid markup. The dialect rework is backward-compatible: existing boolean/flavor configs still work (they coerce to the new values), and are now deprecated.
✨ What's New
1. Dialect capabilities are typed by syntax, not flavor
Each mdConfig.dialect capability now names the syntax it selects: admonitions: 'blockquote' | 'fence' | 'fence-attribute', and strikethrough/definitionLists/footnotes/citations/wikilinks/attributeLists as '<marker>' | 'none' (e.g. strikethrough: 'tilde', wikilinks: 'double-bracket'). A shared convention is a single value, and a second syntax can be added later without a breaking change. A new highlight: 'equals' | 'none' capability joins them.
2. ==highlight== round-trips through Markdown
In dialects that define it (Obsidian/extended), a highlighted run emits as ==text== and ==text== parses back to a highlight. Other dialects keep the HTML <mark> fallback.
3. Link & image titles are preserved
[text](url "Title") and  now keep their title in both directions. Previously an inline destination swallowed url "Title" as one URL.
4. fallbackToHtml.itemLineBreaks
A multi-paragraph list item joins onto its single Markdown line with <br> (default on), mirroring cellLineBreaks for table cells.
🔧 What's Fixed
1. Nested lists survive the round trip
An HTML <li> that wraps its text in <p> (the shape rich-text editors emit) exported as - a\n\n\n - a1, which reparsed flat. List items are now tight, a conservative parser pass rejoins a blank-line-split child, and generated HTML nests spec-validly (<li>a<ul>…</ul></li> instead of the invalid sibling shape), which also makes generated EPUB XHTML valid.
2. GFM table column alignment through HTML
:--- / :---: / ---: alignment now lives on each cell and is emitted as text-align on <th>/<td> (and read back), so per-column alignment survives md → HTML → md, the editor import path, instead of vanishing on the HTML hop.
3. HTML inline & block fidelity
Inline code emits <code> (not a font-family: monospace <span>); a single-line code block with a language stays a <pre><code> block; a plain <blockquote> round-trips to > quoted; an HTML <br> reads back as a hard line break rather than collapsing to a space; and an own-line $$…$$ parses as block math instead of leaking stray $.
⚠️ Deprecated
Boolean dialect toggles (strikethrough: true) and admonition flavor names (admonitions: 'github') still work. They coerce to the new syntax values (true becomes the marker, false becomes 'none'; flavors become 'blockquote'/'fence'/'fence-attribute'), but are deprecated and will be removed in the next major. Prefer the syntax names.
📝 Also
- Fixed a cold-run
npm testflake where a PDF-OCR parity timeout was killed at the 30s cap and misreported as a0.0% similaritycontent mismatch. Timeouts now surface distinctly and the OCR run gets a 120s budget. Test tooling only. (#111)
🛠 Getting Started
npm install officeparser@7.7.0🔗 Full Changelog: View v7.7.0 details
🔗 Documentation & Visualizer: officeparser.harshankur.com