Add numbered list conversion commands (slash and parentheses styles)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,3 +28,21 @@ export function bulletToArrow(text: string): string {
|
||||
line.startsWith("* ") ? "→ " + line.slice(2) : "→ " + line
|
||||
).join("\n");
|
||||
}
|
||||
|
||||
export function numberedListSlash(text: string): string {
|
||||
let n = 0;
|
||||
return text.split("\n").map(line => {
|
||||
n++;
|
||||
const content = line.startsWith("* ") ? line.slice(2) : line;
|
||||
return `${n}/ ${content}`;
|
||||
}).join("\n");
|
||||
}
|
||||
|
||||
export function numberedListParens(text: string): string {
|
||||
let n = 0;
|
||||
return text.split("\n").map(line => {
|
||||
n++;
|
||||
const content = line.startsWith("* ") ? line.slice(2) : line;
|
||||
return `(${n}) ${content}`;
|
||||
}).join("\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user