File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @blinkk/root ' : patch
3
+ ' @blinkk/root-cms ' : patch
4
+ ---
5
+
6
+ chore: remove trailing   ; from rich text lines
Original file line number Diff line number Diff line change @@ -125,10 +125,16 @@ export function normalizeString(str: string) {
125
125
const lines = String ( str )
126
126
. trim ( )
127
127
. split ( '\n' )
128
- . map ( ( line ) => line . trimEnd ( ) ) ;
128
+ . map ( ( line ) => removeTrailingWhitespace ( line ) ) ;
129
129
return lines . join ( '\n' ) ;
130
130
}
131
131
132
+ function removeTrailingWhitespace ( str : string ) {
133
+ return String ( str )
134
+ . trimEnd ( )
135
+ . replace ( / & n b s p ; $ / , '' ) ;
136
+ }
137
+
132
138
export function normalizeLocale ( locale : string ) {
133
139
const i18nConfig = window . __ROOT_CTX . rootConfig . i18n || { } ;
134
140
const i18nLocales = i18nConfig . locales || [ 'en' ] ;
Original file line number Diff line number Diff line change @@ -45,6 +45,12 @@ export function normalizeString(str: string) {
45
45
const lines = String ( str )
46
46
. trim ( )
47
47
. split ( '\n' )
48
- . map ( ( line ) => line . trimEnd ( ) ) ;
48
+ . map ( ( line ) => removeTrailingWhitespace ( line ) ) ;
49
49
return lines . join ( '\n' ) ;
50
50
}
51
+
52
+ function removeTrailingWhitespace ( str : string ) {
53
+ return String ( str )
54
+ . trimEnd ( )
55
+ . replace ( / & n b s p ; $ / , '' ) ;
56
+ }
You can’t perform that action at this time.
0 commit comments