Skip to content

Releases: grub-basket/Highlight-Migrator

0.1.4

Choose a tag to compare

@github-actions github-actions released this 06 Sep 05:40

0.1.4

Store-review fix, no behaviour change.

Changes

  • Replace direct element.style assignments (the colour swatch background and the preview chip colour in the review tab) with setCssStyles(...). This resolves the community-store lint error obsidianmd/no-static-styles-assignment. The review tab looks and behaves exactly as before.

0.1.3

Choose a tag to compare

@github-actions github-actions released this 04 Sep 14:07

0.1.3

Broader colour coverage, safer defaults, and protection for annotated highlights.

Colour mapping

  • Recognise the complete Highlightr / Highlightr Plus default palette, not just the six core colours. Pink, cyan/aqua, grey, and the higher-opacity ("floating") variants of each colour now map exactly instead of being guessed. Pink maps to red, cyan/aqua to blue, and grey to a plain (uncoloured) highlight, since Obsidian has no native grey.
  • Class-based highlights are matched against the nine stock hltr-<name> classes, with grey mapping to a plain highlight.

Custom colours are left for you to decide

  • A colour that is not a recognised default no longer receives an automatic best-guess suggestion. Its row in the review table is left blank ("— choose —") so you consciously pick a colour or skip it. This removes the risk of a wrong auto-suggestion on an unusual shade.
  • The conversion plan now reports an "undecided" count alongside convert and skip. Undecided rows are left untouched when you convert.

Annotation safety

  • Highlightr Plus can attach metadata to a highlight (data-note, data-tags, data-name, data-type). Converting such a highlight to native syntax would discard that metadata, because native highlights cannot carry it. These highlights are now detected and treated as unsafe: they are skipped and counted, never silently converted.

Build and repository

  • The project now builds with npm and commits a package-lock.json, so builds are reproducible from a clean checkout.
  • Added a README and an MIT licence.

0.1.2

Choose a tag to compare

@github-actions github-actions released this 03 Sep 22:13

0.1.2

Maintenance release addressing store-review feedback.

Changes

  • Remove two unused catch error bindings in the migration code (the "'e' is defined but never used" review finding). The blocks that deliberately ignore an error now use an optional catch binding.

0.1.1

Choose a tag to compare

@github-actions github-actions released this 03 Sep 22:06

0.1.1

Maintenance release — store-readiness and a small robustness fix.

Changes

  • Raise minAppVersion to 1.7.2, which Workspace.revealLeaf requires. This clears the community-store lint error (no-unsupported-api) so the plugin is submission-ready.
  • Rename command ids to drop the redundant plugin-id prefix, per the Obsidian command-id convention (open-migrator, revert-last-migration).
  • Scan reports now pick a non-colliding filename if two are written within the same second, instead of failing to write the second one.

0.1.0

Choose a tag to compare

@github-actions github-actions released this 03 Sep 21:44

0.1.0

First release. Migrate legacy <mark> HTML highlights — such as those written by the Highlightr plugin — to Obsidian's native highlight colours (==🔴text==), with a guided, fully reversible workflow.

Features

  • Vault scan finds every legacy <mark> highlight and groups them by distinct colour, with per-colour occurrence and note counts. Detects both inline hex (<mark style="background:#RRGGBBAA">) and Highlightr class markup (<mark class="hltr-…">).
  • Full-tab review UI: a table mapping each source colour to a native colour (Red, Orange, Yellow, Green, Blue, Purple), plain Default (no colour), or Skip. Each row shows a colour swatch, counts, and a live preview of the resulting syntax, with a running conversion plan.
  • Smart suggestions: the six stock Highlightr colours are matched exactly to their native equivalents; any other colour falls back to the nearest native colour by perceptual (CIELAB) distance. Every suggestion can be overridden per row.
  • Backup before writing: every affected note is copied — untouched — into a timestamped folder under the configured backup folder, alongside a manifest.json, before any conversion runs. Backup folder names are collision-checked so a backup never overwrites a previous one.
  • Revert: restore every note in a migration from its backup copies, via the review UI or the "Revert last migration" command.
  • Scan report note: optionally writes a report (human-readable tree plus a machine-readable JSON block) recording the colours found and the mapping used.
  • Safety: highlights that span multiple lines or already contain == are detected and left untouched rather than risk corrupting them; the count of such skipped highlights is surfaced. Conversion is idempotent — re-running never double-converts.

Settings

  • Toggle conversion of class-based (hltr-*) highlights.
  • Configure the backup folder and report folder names.
  • Toggle writing a report note on each conversion.