File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
packages/reva-api/modules/referential/rncp Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -226,10 +226,19 @@ function splitString(value: string): string[] {
226
226
}
227
227
228
228
// Jump line + UpperFirst regEx
229
- const regExDefault = new RegExp ( / (? = \n [ A - Z À - Ö ] ) / g) ;
230
- if ( cleanedValue . match ( regExDefault ) ) {
229
+ const regExJumpline_R = new RegExp ( / (? = \r \n \r \n ) / g) ;
230
+ if ( cleanedValue . match ( regExJumpline_R ) ) {
231
231
let list : string [ ] = [ ] ;
232
- list = cleanedValue . split ( regExDefault ) ;
232
+ list = cleanedValue . split ( regExJumpline_R ) ;
233
+ list = list . map ( ( v ) => v . replace ( new RegExp ( / ^ \r \n \r \n / ) , "" ) ) ;
234
+ return list ;
235
+ }
236
+
237
+ // Jump line + UpperFirst regEx
238
+ const regExJumpline_N = new RegExp ( / (? = \n ) / g) ;
239
+ if ( cleanedValue . match ( regExJumpline_N ) ) {
240
+ let list : string [ ] = [ ] ;
241
+ list = cleanedValue . split ( regExJumpline_N ) ;
233
242
list = list . map ( ( v ) => v . replace ( new RegExp ( / ^ \n / ) , "" ) ) ;
234
243
return list ;
235
244
}
You can’t perform that action at this time.
0 commit comments