Skip to content

Commit bed7526

Browse files
committed
chore(string-format): Added better handling for ":" in string titles
1 parent 69959cb commit bed7526

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/string-format/src/title-case.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function titleCase<T extends string | undefined>(
4747
options?: TitleCaseOptions
4848
): T {
4949
return input
50-
?.split(/\s+-\s+/)
50+
?.split(/(\s+-\s+|\s*:\s*)/)
5151
.map(segment =>
5252
decamelize(segment)
5353
.split(/[\s\-_]/)

0 commit comments

Comments
 (0)