@@ -50,6 +50,7 @@ public final class StyleSheetParser
50
50
implements CssValidatorListener , CssParser {
51
51
52
52
private static Constructor co = null ;
53
+ private static boolean isPreprocessed ;
53
54
54
55
static {
55
56
try {
@@ -64,10 +65,15 @@ public final class StyleSheetParser
64
65
CssFouffa cssFouffa ;
65
66
StyleSheet style = new StyleSheet ();
66
67
67
- public StyleSheetParser (ApplContext ac ) {
68
+ public StyleSheetParser (ApplContext ac , boolean isPreprocessed ) {
69
+ this .isPreprocessed = isPreprocessed ;
68
70
ac .setStyleSheet (getStyleSheet ());
69
71
}
70
72
73
+ public StyleSheetParser (ApplContext ac ) {
74
+ new StyleSheetParser (ac , false );
75
+ }
76
+
71
77
public void reInit () {
72
78
style = new StyleSheet ();
73
79
}
@@ -293,7 +299,8 @@ public void parseStyleElement(ApplContext ac, Reader reader,
293
299
294
300
// if (cssFouffa == null) {
295
301
String charset = ac .getCharsetForURL (url );
296
- if (ac .getCssVersion ().compareTo (CssVersion .CSS2 ) >=0 ) {
302
+ if (ac .getCssVersion ().compareTo (CssVersion .CSS2 ) >=0
303
+ && !isPreprocessed ) {
297
304
cssFouffa = new CssFouffa (ac , new UnescapeFilterReader (new BufferedReader (reader )), url , lineno );
298
305
} else {
299
306
cssFouffa = new CssFouffa (ac , reader , url , lineno );
0 commit comments