Add "Convert List Bullets to Em Dash" command
Adds bulletToEmdash() to formatter.ts and registers the new unicode-formatter:bullet-to-emdash command. Updates README accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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 Em Dash** — replaces leading `* ` bullet markers with `— ` on each selected line
|
||||
- Non-mapped characters (punctuation, spaces, emoji, etc.) are passed through unchanged
|
||||
|
||||
## Usage
|
||||
@@ -19,6 +20,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 Em Dash** — replaces `* ` prefixes with `— `
|
||||
|
||||
The selected text is replaced in place.
|
||||
|
||||
@@ -49,8 +51,8 @@ npm run lint # ESLint check
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `src/unicode-maps.ts` | Builds character lookup maps from Unicode code point ranges |
|
||||
| `src/formatter.ts` | `transformText(text, style)` and `cleanText(text)` — character mapping functions |
|
||||
| `src/commands.ts` | Registers the four editor commands with the Obsidian plugin API |
|
||||
| `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/main.ts` | Plugin entry point — calls `registerCommands` on load |
|
||||
|
||||
### Unicode blocks used
|
||||
|
||||
Reference in New Issue
Block a user