Repository navigation
V1.0.8
V1.0.8
This release lands a large batch of preview reliability fixes and rendering improvements — most notably a rebuilt content-update pipeline that stops the preview from full-page reloading on every keystroke — plus MathML rendering, profiling/filtering, richer image handling, and complete English/Chinese localization.
🏗️ Preview Reload Architecture
- The preview no longer reloads the whole page on every source edit. Every edit used to reassign
webview.htmlwholesale — a full page navigation that tore down the DOM, re-decoded every image, and left in-flight scroll/highlight messages racing onto stale or half-loaded content. Edits now post just the freshly-rendered HTML into a dedicated#dita-content-rootdiv; full reloads are reserved for opening a file, a theme switch, and the manual refresh button. Fixes several compounding symptoms this caused: orphaned scroll/highlight animations after a swap, the editor's own auto-reveal fighting the preview's centering, unwanted CSS scroll-anchoring drift, and the editor viewport snapping upward on distant clicks (replaced a fixed ~700ms timing guess with the browser's realscrollendevent). - The same architecture has now been ported to Outline/Book (map) view, which never got this fix — editing a
.ditamappreviously reset scroll to the top and re-decoded every image on every edit, with no restore attempt at all. - Fixed a source ↔ preview scroll-sync feedback loop that could hijack the editor cursor while typing, caused by the preview echoing its own extension-triggered scrolls back out as if they were manual ones.
🧮 MathML
<mathml>formulas now render as real markup via the webview's native MathML Core support, instead of falling back to flattened, unstructured text.- Fixed brackets and absolute-value bars silently vanishing from formulas —
<mfenced>is real MathML 3 (and how Oxygen's equation editor exports every parenthesized/|...|group), but MathML Core dropped it from the spec entirely. It's now expanded at render time into explicit<mo>fence characters.
🏷️ Profiling / Conditional Content
- Profiling attributes (
props,platform,product,audience,otherprops,base,importance,rev,status) are now highlighted with a label naming the matched attribute/value, plus a toolbar Flags toggle and a Filter panel that actually hides content by value — for previewing what a given build/audience would see. - Ditamap/Book view now has its own profiling and filtering, with a topicref's attributes cascading to descendant topicrefs that don't set their own value — matching real
.ditaval/Oxygen conditional-processing semantics. - Fixed ditamap-level profiling display to match Oxygen: one box around the topicref that declares an attribute, enclosing its whole subtree, label shown once — not a repeated chip on every inheriting descendant. Book mode no longer shows topicref-level profiling at all, since it composites topic content for reading the same as opening each topic directly.
- Fixed the highlight box overlapping list bullets/numbers and misaligning nested-list indentation (switched from a wrapping
<span>+borderto attributes applied directly on the element +box-shadow), and the label no longer reserves a fixed empty block below short content.
🖼️ Images
- Alt text,
@scale/@scalefit, and a new zoom/lightbox toolbar — alt text now reads from the<alt>child element or@altattribute;@scaleis honored via CSSzoom; a new per-image −/+/maximize toolbar and click-to-fullscreen lightbox were added. - Fixed the per-image zoom controls shrinking images instead of enlarging them, and the shrink button doing nothing at the default zoom level — added shrink steps below 100% and fixed a closure bug that let zoom on one image affect the wrong baseline.
- Fixed
<img loading="lazy">reserving no space until decoded, causing content below it to jump into place — real width/height is now read from the file header and reserved as an aspect ratio. - Image dimension reads are now cached by file path + modification time — every edit previously re-read every image's file header from disk regardless of whether it had changed; unchanged images now return cached dimensions instantly.
- Images default to left-aligned instead of centered, matching how figures read in Oxygen.
🌐 Localization
- Full English/Simplified Chinese localization of every user-facing string, with automatic detection following the VS Code display language — manifest strings, extension-host strings (notifications, diagnostics, DITA-OT output), webview toolbar/panel strings, and bookmap role badges (第 1 章 / 附录 A / …) all translate through a consistent mechanism. Note-type labels (Warning/警告, …) follow the document's own language instead, matching DITA-OT's own publish-time behavior.
npm run check:l10n— new consistency guard catching missing/untranslated/stale keys across both catalogs.
🔧 Other Fixes
conref+conrefendrange references are now supported — previously only the single element atconrefwas pulled in, silently dropping everything throughconrefend.- Note-type labels (Warning/Attention/…) now cover all 13 DITA 1.3 types (5 previously fell through to an untranslated raw value) and correctly fall back to the editor's display language when a topic has no
xml:langof its own. Added@spectitle/@othertypesupport. - The selected custom CSS theme and page-width dropdown no longer silently revert to default on every edit — both are now persisted per-document.
- Font size and family now persist across preview reopens, with a new reset button.
Full Changelog: V1.0.7...V1.0.8