Add "Convert List Bullets to Arrow" command

Adds bulletToArrow() to formatter.ts and registers the new
unicode-formatter:bullet-to-arrow command. Updates README accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 15:22:25 +01:00
parent 5befb3a0bc
commit 1fab274fd6
3 changed files with 20 additions and 2 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ An [Obsidian](https://obsidian.md) plugin that transforms selected text into Uni
- **Unicode Italic** — converts letters to sans-serif italic (𝘈𝘉𝘊 / 𝘢𝘣𝘤)
- **Unicode Bold Italic** — converts letters to sans-serif bold italic (𝘼𝘽𝘾 / 𝙖𝙗𝙘)
- **Remove Unicode Formatting** — converts any formatted Unicode characters back to plain ASCII
- **Convert List Bullets to Arrow** — replaces leading `* ` bullet markers with `→ ` on each selected line
- **Convert List Bullets to Em Dash** — replaces leading `* ` bullet markers with `— ` on each selected line
- Non-mapped characters (punctuation, spaces, emoji, etc.) are passed through unchanged
@@ -20,6 +21,7 @@ An [Obsidian](https://obsidian.md) plugin that transforms selected text into Uni
- **Format as Unicode Italic**
- **Format as Unicode Bold Italic**
- **Remove Unicode Formatting** — reverses any of the above back to plain ASCII
- **Convert List Bullets to Arrow** — replaces `* ` prefixes with `→ `
- **Convert List Bullets to Em Dash** — replaces `* ` prefixes with `— `
The selected text is replaced in place.
@@ -52,7 +54,7 @@ npm run lint # ESLint check
|------|---------|
| `src/unicode-maps.ts` | Builds character lookup maps from Unicode code point ranges |
| `src/formatter.ts` | `transformText(text, style)`, `cleanText(text)`, and `bulletToEmdash(text)` — text transformation functions |
| `src/commands.ts` | Registers the five editor commands with the Obsidian plugin API |
| `src/commands.ts` | Registers the six editor commands with the Obsidian plugin API |
| `src/main.ts` | Plugin entry point — calls `registerCommands` on load |
### Unicode blocks used