No description
  • TypeScript 86.6%
  • CSS 8.3%
  • JavaScript 5.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
AcerecA eb86ecd4f6 docs: expand README and add screenshots
Document first-match-wins rules, replacement-template links, per-rule
accent/icon, context guards, range validation and hover-to-reveal; add
npm test. Include cropped screenshots of Live Preview, Reading view and
the settings tab.
2026-10-31 10:45:47 +01:00
screenshots docs: expand README and add screenshots 2026-10-31 10:45:47 +01:00
scripts feat: link syntax in replacement templates 2026-10-26 12:15:13 +01:00
src chore: remove extraneous console logging 2026-10-30 16:20:26 +01:00
test-vault Update styles and add favicon 2026-10-30 09:13:59 +01:00
.gitignore M2 editor decorations: CM6 view plugin with boxes, MDI icon widgets, code skipping 2026-10-26 10:46:16 +01:00
esbuild.config.mjs fix(load): broken esbuild banner crashed plugin at import time 2026-10-26 10:48:10 +01:00
favicon.svg Update styles and add favicon 2026-10-30 09:13:59 +01:00
main.ts chore: remove extraneous console logging 2026-10-30 16:20:26 +01:00
manifest.json chore: bump version to 0.1 2026-10-30 09:18:23 +01:00
package-lock.json revert(editor): restore widget+mark rendering for raw matches 2026-10-26 11:54:21 +01:00
package.json chore: bump version to 0.1 2026-10-30 09:18:23 +01:00
PLAN.md chore: remove pill metrics debug command; document DPR-snap constraint 2026-10-26 13:50:10 +01:00
README.md docs: expand README and add screenshots 2026-10-31 10:45:47 +01:00
styles.css fix: move regex error messages below input field 2026-10-30 12:45:48 +01:00
tsconfig.json M1 scaffold: plugin builds & loads; test vault with default rule set 2026-10-26 10:42:53 +01:00

POA Highlights

Obsidian plugin that highlights matched text (times, ISO datetimes, ...) in a colored box with an MDI icon prefix. Replacement templates can condense or rewrite the displayed text (e.g. show only the time part of an ISO datetime, or turn it into a link). The note content is never modified - highlighting and replacement are purely visual, and the original text stays searchable.

Features

  • Highlights in Live Preview and Reading view.
  • Ordered, first-match-wins rules: a higher-priority match claims its span and blocks overlapping lower-priority rules (so an ISO datetime stays one pill instead of being split by the time rule).
  • Per rule: enable/disable, regex, MDI icon (full icon set via picker), accent color, and a replacement template.
  • Replacement templates use $1-$9 capture-group references; an empty template shows the raw match. Invalid/missing group refs fall back to the raw text.
  • Templates may contain one link: [[note|display]] (vault note, #heading allowed) or [display](url) (external). The link is rendered as a clickable anchor inside the pill.
  • When a match is condensed, hovering the pill reveals the original text.
  • Matches inside inline code and code blocks are skipped.
  • Context guards keep URL time components (https://host/10:20) and filename fragments (report-08:30.txt) from matching.
  • Built-in time/date range validation rejects impossible values (25:00, 8:60, 2026-13-45).
  • Per-rule accent color overrides the theme accent; colors are theme-aware by default.

Screenshots

Live Preview (editor):

Live Preview highlights

Reading view:

Reading view highlights

Settings tab:

POA Highlights settings

Install (manual)

  1. Download the latest release assets: main.js, manifest.json, styles.css.
  2. In your vault, create the folder .obsidian/plugins/obsidian-poa/.
  3. Copy the three files into that folder.
  4. In Obsidian: Settings -> Community plugins -> Turn on community plugins (if restricted mode is on), then enable POA Highlights.

Build from source

Requirements: Node.js >= 20, npm >= 10.

npm install
npm run build        # production build -> dist/main.js (also deploys to test vault)
npm run dev          # watch + rebuild
npm run typecheck    # tsc -noEmit
npm test             # matcher self-test

Deploy to the bundled test vault:

npm run deploy-vault

Usage

  • Configure rules in Settings -> POA Highlights: enable/disable, reorder, regex, icon, color, template. Higher rules claim their matches first.
  • Defaults: ISO datetimes (2026-10-20T10:20:30, condensed to the time part), times with seconds, and plain times.
  • Replacement templates use $1-$9 capture groups (empty = show raw match).
  • Pick any MDI icon via the Browse... button in a rule's Icon field.
  • Set an Accent color per rule, or leave empty to use the theme accent.

Notes

  • Display-only: original text remains searchable.
  • Matches inside inline code and code blocks are skipped.
  • Replacing changes the visible width, so text may reflow; disable the rule (or hover the pill) to see the raw text.