No description
- TypeScript 86.6%
- CSS 8.3%
- JavaScript 5.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
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. |
||
| screenshots | ||
| scripts | ||
| src | ||
| test-vault | ||
| .gitignore | ||
| esbuild.config.mjs | ||
| favicon.svg | ||
| main.ts | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| PLAN.md | ||
| README.md | ||
| styles.css | ||
| tsconfig.json | ||
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-$9capture-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,#headingallowed) 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):
Reading view:
Settings tab:
Install (manual)
- Download the latest release assets:
main.js,manifest.json,styles.css. - In your vault, create the folder
.obsidian/plugins/obsidian-poa/. - Copy the three files into that folder.
- 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-$9capture 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.


