File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -475,7 +475,7 @@ var DATE_FORMATS = {
475
475
GGGG : longEraGetter
476
476
} ;
477
477
478
- var DATE_FORMATS_SPLIT = / ( (?: [ ^ y M L d H h m s a Z E w G ' ] + ) | (?: ' (?: [ ^ ' ] | ' ' ) * ' ) | (?: E + | y + | M + | L + | d + | H + | h + | m + | s + | a | Z | G + | w + ) ) ( . * ) / ,
478
+ var DATE_FORMATS_SPLIT = / ( (?: [ ^ y M L d H h m s a Z E w G ' ] + ) | (?: ' (?: [ ^ ' ] | ' ' ) * ' ) | (?: E + | y + | M + | L + | d + | H + | h + | m + | s + | a | Z | G + | w + ) ) ( [ \s \S ] * ) / ,
479
479
NUMBER_STRING = / ^ - ? \d + $ / ;
480
480
481
481
/**
Original file line number Diff line number Diff line change @@ -504,6 +504,11 @@ describe('filters', function() {
504
504
expect ( date ( morning , 'yy/xxx' ) ) . toEqual ( '10/xxx' ) ;
505
505
} ) ;
506
506
507
+ it ( 'should allow newlines in format' , function ( ) {
508
+ expect ( date ( midnight , 'EEE\nMMM d\'\n\'yy/xxx\n' ) ) .
509
+ toEqual ( 'Fri\nSep 3\n10/xxx\n' ) ;
510
+ } ) ;
511
+
507
512
it ( 'should support various iso8061 date strings with timezone as input' , function ( ) {
508
513
var format = 'yyyy-MM-dd ss' ;
509
514
You can’t perform that action at this time.
0 commit comments