Skip to content

Releases

HTML Export Preview 0.1.2

Choose a tag to compare

@1569y 1569y released this 08 Nov 09:46

Release Notes — v0.1.2

Theme-compatibility patch. No new features. This release only fixes how
theme CSS is embedded in the HTML preview and in exported single-file pages.

Fixed

  • Prevent theme CSS containing embedded SVG <style> markup from leaking
    into the HTML preview or exported single-file pages.
    HTML parses <style>
    as a RAWTEXT element, so a literal </style> inside a theme's inline SVG
    data URI ended the style block early and every remaining rule was rendered
    as visible body text. The embedding boundary now writes that sequence as the
    CSS escape <\/style>: the CSS parser restores /, while the HTML
    tokenizer no longer sees a closing tag.
  • Preserve CSS mask rules while safely embedding theme styles. Escaping
    happens only at the embedding boundary. SVG data URIs and mask-image /
    -webkit-mask-image rules keep their original meaning, and directory
    exports still write assets/export.css byte-for-byte unchanged because
    they load CSS through a <link> element rather than inline.
  • Avoid misleading warnings when special CSS has been handled
    successfully.
    A stylesheet that was safely embedded is no longer counted
    as a CSS warning in the export report. CSS that genuinely cannot be
    embedded is still refused with an explicit reason instead of producing a
    page that displays its own stylesheet.

Scope

This is a compatibility patch for themes that embed SVG markup in their CSS.
It adds no settings, no UI, no data migration and no change to the export
workflow. It does not claim compatibility with every Obsidian theme;
themes with other unusual CSS constructs may still need individual testing.
The regression suite added for this fix uses small, self-contained CSS
samples only; no third-party theme files or user notes are included in the
repository.

Verification

  • tsc -noEmit, the full npm test suite (including the CSS boundary
    regressions) and npm run build pass.
  • Two consecutive production builds produce a byte-identical main.js, and a
    clean source tree rebuilt with the same commands used by GitHub Actions
    reproduces the same bundle.
  • Real-browser DOM checks confirm that the style element is not terminated
    early, that no CSS appears as body text, and that the mask rules survive
    with the same computed values and CSSOM rule text as the unescaped
    stylesheet.

Upgrade / downgrade

Replace main.js, manifest.json and styles.css in
.obsidian/plugins/html-export-preview/ (keep data.json). No data
migration is performed automatically. minAppVersion remains 1.15.0.

HTML Export Preview 0.1.1

Choose a tag to compare

@1569y 1569y released this 07 Nov 16:16

Release Notes — v0.1.1

Maintenance release for the Obsidian plugin review. No new features and no
change to the exported HTML compared with v0.1.0.

What changed

  • Fixed the Source Code Error reported by the official Obsidian automated
    review.
    The preview editor applied the selection outline on images,
    Mermaid diagrams and tables with inline style.setProperty('outline', ...)
    calls. The outline now comes from a he-media-selected CSS class defined in
    the preview's live stylesheet, toggled with standard classList add/remove.
    This rule is editor-only: responsiveCss() and buildHtml() were not
    modified, so exported HTML gains no editor styling and is otherwise
    unchanged.
  • Restructured the documentation into two languages. README.md is now
    the English default and contains explicit Installation and How to Use
    sections. Installation documents only the two real paths (BRAT with
    1569y/html-export-preview, and manual installation of the three Release
    assets); it states that the plugin is not yet in the Obsidian community
    plugin directory. The existing Simplified Chinese edition is preserved as
    README.zh-CN.md, and both editions link to each other at the top.
    README.en.md is now a short redirect stub so old links keep working, and
    a second copy of the English text is no longer maintained.
  • Version metadata: manifest.json and package.json are 0.1.1.
    minAppVersion remains 1.15.0. versions.json remains
    {"0.1.0": "1.15.0"} — the official Versions documentation says a new
    entry is only required when minAppVersion changes, so no duplicate
    0.1.1 record was added.

Across the whole 0.1.0..0.1.1 range the only changed source file is
src/view/preview-view.ts (+32 / -12). styles.css is byte-identical to the
v0.1.0 asset, the export pipeline is untouched, and main.js differs only by
the selection-outline fix above. No settings, no data migration and no
user-visible workflow changed.

Verification

  • tsc -noEmit passes; npm test passes (the full offline unit suite,
    including the preview lifecycle case covering the CSS-class selection
    highlight).
  • npm run build reproduces the committed main.js byte-for-byte; a clean
    git archive source tree rebuilt with the same commands used by GitHub
    Actions produces an identical bundle.
  • The official pre-review on fix/obsidian-review-0.1.1 at commit 67aba2b
    completed with Source Code: no Error and Dependencies: Pass. Two
    README warnings remain even though the English default README contains
    real Installation and How to Use sections. They are recorded as a
    likely scanner false positive; no further README rewrites were made and the
    bilingual documentation is left intact.

Known limitations

  • Desktop-only (isDesktopOnly: true). Requires Obsidian 1.15.0 or later.
  • Export captures the rendered reading view, not raw markdown; some
    scripted/interactive embeds may not capture perfectly.
  • Not yet listed in the Obsidian community plugin directory. Install with
    BRAT or manually from the Release assets (see README.md).

Upgrade / downgrade

Replace main.js, manifest.json and styles.css in
.obsidian/plugins/html-export-preview/ (keep data.json). No data
migration is performed automatically.

HTML Export Previewer 0.1.0

Choose a tag to compare

@1569y 1569y released this 07 Nov 10:33

Release Notes — v0.1.0

First public release.

What's in this release

  • Preview-then-export workflow: nothing is written until the user confirms.
  • Standalone single-file HTML export (images / fonts / styles inlined, offline-openable).
  • Directory / asset-bundle export.
  • Theme, CSS snippets, and Side Notes preserved in the output.
  • Right-hand single-element panel: image, Mermaid, and table tuning (width: original / percent / px; alignment: left / center / right; reset to defaults).
  • Same-article anchor navigation inside the preview/export.
  • Export to any writable directory (including outside the vault).
  • Safe overwrite flow: explicit Replace / Save-as / Cancel; cancel never overwrites, replace affects only the confirmed target.
  • Desktop "reveal in file manager" after export (toggleable; no effect on hosts without shell support).
  • Local per-vault HMAC manifest signing for export integrity (offline, no network).

Verification done before tagging

  • tsc -noEmit passes.
  • Production build is deterministic (rebuild reproduces the committed main.js byte-for-byte).
  • Unit suites green (offline, Node): run-unit 32/32, run-preview-lifecycle 20/20, run-share-startup 4/4, run-p2-media 20/20, run-p3-external 26/26, run-share-safe 25/25, run-share-single 20/20, run-share-replace 5/5.
  • Code-level review of startup path: onload() performs only config load + per-vault key resolution + view/command/ribbon/settings registration (no CSS scan, no markdown render, no HTML build, no font collection, no large disk I/O at load). Restored preview leaves do not re-capture the note at startup. View teardown is idempotent and releases the iframe context and all listeners.
  • Policy review: no telemetry / analytics / auto-update / phone-home; network use is limited to inlining the note's own remote CSS/font assets at export time (disclosed in README).

Known limitations

  • Desktop-only (isDesktopOnly: true). Requires Obsidian 1.15.0 or later.
  • Export captures the rendered reading view, not raw markdown; some scripted/interactive embeds may not capture perfectly.
  • Real Obsidian UI acceptance (panel visibility, reveal-in-folder, overwrite dialog) was performed by the maintainer on their machine; the automated suites cover the underlying logic.

Upgrade / downgrade

Replace main.js and styles.css (keep manifest.json and data.json). No data migration is performed automatically.