(css, id, variable)
| 2685 | } |
| 2686 | |
| 2687 | function 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; |
no test coverage detected