File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1148,25 +1148,26 @@ Instantiating Counters</h4>
11481148
11491149 1. Let |num| be 0.
11501150
1151- 2. Let |first | be true .
1151+ 2. Let |lastNonZeroIncrementNegated | be 0 .
11521152
11531153 3. For each element or pseudo-element |el| that increments or
11541154 sets the same counter in the same [=scope=] :
11551155
11561156 1. Let |incrementNegated| be |el|'s ' counter-increment' integer value for this counter,
11571157 multiplied by -1.
11581158
1159- 2. If |first| is true,
1160- then add |incrementNegated| to |num| and
1161- set |first| to false.
1159+ 2. If |incrementNegated| is not zero,
1160+ then set |lastNonZeroIncrementNegated| to |incrementNegated|.
11621161
11631162 3. If |el| sets this counter with 'counter-set' ,
11641163 then add that integer value to |num| and
11651164 break this loop.
11661165
11671166 4. Add |incrementNegated| to |num|.
11681167
1169- 4. Return |num|.
1168+ 4. Add |lastNonZeroIncrementNegated| to |num|.
1169+
1170+ 5. Return |num|.
11701171
11711172 Note: Only [=reversed=] counters can be instantiated without an initial value.
11721173
You can’t perform that action at this time.
0 commit comments