mirror of
https://github.com/jeffvli/feishin.git
synced 2024-11-20 06:27:09 +01:00
Fix title case transformer
This commit is contained in:
parent
ccd8d2b6b0
commit
9ca364dd0e
@ -88,7 +88,9 @@ const titleCasePostProcessor: PostProcessorModule = {
|
||||
type: 'postProcessor',
|
||||
name: 'titleCase',
|
||||
process: (value: string) => {
|
||||
return value.charAt(0).toLocaleUpperCase() + value.slice(1).toLowerCase();
|
||||
return value.replace(/\S\S*/g, (txt) => {
|
||||
return txt.charAt(0).toLocaleUpperCase() + txt.slice(1).toLowerCase();
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user