mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
10 lines
572 B
TypeScript
10 lines
572 B
TypeScript
// We need to remove certain leading characters from the path in order for our
|
|
// leading ellipses trick to work.
|
|
// However, we want to preserve all language characters (including CJK,
|
|
// Cyrillic, etc.) and only remove specific punctuation that might interfere
|
|
// with the ellipsis display.
|
|
//
|
|
// Only remove specific punctuation characters that might interfere with
|
|
// ellipsis display. Keep all language characters (including CJK, Cyrillic
|
|
// etc.) and numbers.
|
|
export const removeLeadingNonAlphanumeric = (path: string): string => path.replace(/^[/\\:*?"<>|]+/, "")
|