File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
utils/notifications/handlers Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import { sendRendererEvent } from './events';
1414
1515export function takeScreenshot ( mb : Menubar ) {
1616 const date = new Date ( ) ;
17- const dateStr = date . toISOString ( ) . replace ( / : / g , '-' ) ;
17+ const dateStr = date . toISOString ( ) . replaceAll ( ':' , '-' ) ;
1818
1919 const capturedPicFilePath = path . join (
2020 os . homedir ( ) ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ interface ITitle {
1313}
1414
1515export const Title : FC < ITitle > = ( { size = 2 , ...props } ) => {
16- const name = props . children . toLowerCase ( ) . replace ( ' ' , '-' ) ;
16+ const name = props . children . toLowerCase ( ) . replaceAll ( ' ' , '-' ) ;
1717
1818 return (
1919 < legend >
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export function formatForDisplay(text: string[]): string {
3232 return text
3333 . join ( ' ' )
3434 . replace ( / ( [ a - z ] ) ( [ A - Z ] ) / g, '$1 $2' ) // Add space between lowercase character followed by an uppercase character
35- . replace ( / _ / g , ' ' ) // Replace underscores with spaces
35+ . replaceAll ( '_' , ' ' ) // Replace underscores with spaces
3636 . replace ( / \w + / g, ( word ) => {
3737 // Convert to proper case (capitalize first letter of each word)
3838 return word . charAt ( 0 ) . toUpperCase ( ) + word . slice ( 1 ) . toLowerCase ( ) ;
You can’t perform that action at this time.
0 commit comments