MCPcopy Index your code
hub / github.com/totaljs/framework / nested

Function nested

internal.js:2687–2846  ·  view source on GitHub ↗
(css, id, variable)

Source from the content-addressed store, hash-verified

2685}
2686
2687function nested(css, id, variable) {
2688
2689 if (!css)
2690 return css;
2691
2692 var index = 0;
2693 var output = '';
2694 var A = false;
2695 var count = 0;
2696 var beg;
2697 var begAt;
2698 var valid = false;
2699 var plus = '';
2700 var skip = false;
2701 var skipImport = '';
2702 var isComment = false;
2703 var comment = '';
2704 var skipView = false;
2705 var skipType;
2706
2707 while (true) {
2708
2709 var a = css[index++];
2710 if (!a)
2711 break;
2712
2713 if (a === '/' && css[index] === '*') {
2714 isComment = true;
2715 index++;
2716 comment = '';
2717 continue;
2718 }
2719
2720 if (isComment) {
2721 comment += a;
2722 if (a === '*' && css[index] === '/') {
2723 isComment = false;
2724 index++;
2725 if (comment === 'auto*')
2726 output += '/*auto*/';
2727 }
2728 continue;
2729 }
2730
2731 if (a === '\n' || a === '\r')
2732 continue;
2733
2734 if (a === '$' && variable)
2735 variable();
2736
2737 if (a === '@' && css[index] === '{')
2738 skipView = true;
2739
2740 if (skipView) {
2741 plus += a;
2742 if (a === '}')
2743 skipView = false;
2744 continue;

Callers 2

internal.jsFile · 0.85
process_nestedFunction · 0.85

Calls 1

process_nestedFunction · 0.85

Tested by

no test coverage detected