(html, index, filename, nomarkup)
| 2619 | } |
| 2620 | |
| 2621 | function compressCSS(html, index, filename, nomarkup) { |
| 2622 | |
| 2623 | if (!CONF.allow_compile_style) |
| 2624 | return html; |
| 2625 | |
| 2626 | var strFrom = '<style type="text/css">'; |
| 2627 | var strTo = '</style>'; |
| 2628 | |
| 2629 | var indexBeg = html.indexOf(strFrom, index || 0); |
| 2630 | if (indexBeg === -1) { |
| 2631 | strFrom = '<style>'; |
| 2632 | indexBeg = html.indexOf(strFrom, index || 0); |
| 2633 | if (indexBeg === -1) |
| 2634 | return html; |
| 2635 | } |
| 2636 | |
| 2637 | var indexEnd = html.indexOf(strTo, indexBeg + strFrom.length); |
| 2638 | if (indexEnd === -1) |
| 2639 | return html; |
| 2640 | |
| 2641 | var css = html.substring(indexBeg, indexEnd + strTo.length); |
| 2642 | var val = css.substring(strFrom.length, css.length - strTo.length).trim(); |
| 2643 | var compiled = exports.compile_css(val, filename, nomarkup); |
| 2644 | html = html.replacer(css, (strFrom + compiled.trim() + strTo).trim()); |
| 2645 | return compressCSS(html, indexBeg + compiled.length + 8, filename, nomarkup); |
| 2646 | } |
| 2647 | |
| 2648 | function variablesCSS(content) { |
| 2649 |
no outgoing calls
no test coverage detected