main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 5 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
929 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
3 | exports.counterReset = void 0;
|
---|
4 | var parser_1 = require("../syntax/parser");
|
---|
5 | exports.counterReset = {
|
---|
6 | name: 'counter-reset',
|
---|
7 | initialValue: 'none',
|
---|
8 | prefix: true,
|
---|
9 | type: 1 /* LIST */,
|
---|
10 | parse: function (_context, tokens) {
|
---|
11 | if (tokens.length === 0) {
|
---|
12 | return [];
|
---|
13 | }
|
---|
14 | var resets = [];
|
---|
15 | var filtered = tokens.filter(parser_1.nonWhiteSpace);
|
---|
16 | for (var i = 0; i < filtered.length; i++) {
|
---|
17 | var counter = filtered[i];
|
---|
18 | var next = filtered[i + 1];
|
---|
19 | if (parser_1.isIdentToken(counter) && counter.value !== 'none') {
|
---|
20 | var reset = next && parser_1.isNumberToken(next) ? next.number : 0;
|
---|
21 | resets.push({ counter: counter.value, reset: reset });
|
---|
22 | }
|
---|
23 | }
|
---|
24 | return resets;
|
---|
25 | }
|
---|
26 | };
|
---|
27 | //# sourceMappingURL=counter-reset.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.