File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,12 @@ public static function parse(ParserState $oParserState) {
21
21
if ($ oParserState ->comes ('( ' )) {
22
22
$ iNestingLevel ++;
23
23
$ oCalcList ->addListComponent ($ oParserState ->consume (1 ));
24
+ $ oParserState ->consumeWhiteSpace ();
24
25
continue ;
25
26
} else if ($ oParserState ->comes (') ' )) {
26
27
$ iNestingLevel --;
27
28
$ oCalcList ->addListComponent ($ oParserState ->consume (1 ));
29
+ $ oParserState ->consumeWhiteSpace ();
28
30
continue ;
29
31
}
30
32
if ($ iLastComponentType != CalcFunction::T_OPERAND ) {
@@ -53,6 +55,7 @@ public static function parse(ParserState $oParserState) {
53
55
);
54
56
}
55
57
}
58
+ $ oParserState ->consumeWhiteSpace ();
56
59
}
57
60
$ oList ->addListComponent ($ oCalcList );
58
61
$ oParserState ->consume (') ' );
Original file line number Diff line number Diff line change @@ -404,7 +404,8 @@ function testCalcInFile() {
404
404
$ oDoc = $ this ->parsedStructureForFile ('calc ' , Settings::create ()->withMultibyteSupport (true ));
405
405
$ sExpected = 'div {width: calc(100% / 4);}
406
406
div {margin-top: calc(-120% - 4px);}
407
- div {height: -webkit-calc(9 / 16 * 100%) !important;width: -moz-calc(( 50px - 50% ) * 2);} ' ;
407
+ div {height: -webkit-calc(9 / 16 * 100%) !important;width: -moz-calc(( 50px - 50% ) * 2);}
408
+ div {width: calc(50% - ( ( 4% ) * .5 ));} ' ;
408
409
$ this ->assertSame ($ sExpected , $ oDoc ->render ());
409
410
}
410
411
Original file line number Diff line number Diff line change 4
4
height : -webkit-calc (9 / 16 * 100% )!important ;
5
5
width : -moz-calc ((50px - 50% )* 2 );
6
6
}
7
+ div { width : calc (50% - ( ( 4% ) * 0.5 ) ); }
You can’t perform that action at this time.
0 commit comments