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:
@@ -16,3 +16,9 @@ export function transformText(text: string, style: FormatStyle): string {
|
||||
export function cleanText(text: string): string {
|
||||
return [...text].map(ch => UNICODE_TO_ASCII_MAP.get(ch) ?? ch).join("");
|
||||
}
|
||||
|
||||
export function bulletToEmdash(text: string): string {
|
||||
return text.split("\n").map(line =>
|
||||
line.startsWith("* ") ? "— " + line.slice(2) : line
|
||||
).join("\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user