use of com.helger.css.handler.LoggingCSSParseExceptionCallback in project ph-css by phax.
the class Issue34Test method testIssue.
@Test
@Ignore("TODO")
public void testIssue() {
final String css = ".pen {background-color:red} {* some incorrect block *} .pen {background-color: blue}";
final CSSReaderSettings aSettings = new CSSReaderSettings().setCSSVersion(ECSSVersion.LATEST).setBrowserCompliantMode(true).setCustomErrorHandler(new LoggingCSSParseErrorHandler()).setCustomExceptionHandler(new LoggingCSSParseExceptionCallback());
final CascadingStyleSheet cascadingStyleSheet = CSSReader.readFromStringStream(css, aSettings);
assertNotNull(cascadingStyleSheet);
final CSSWriter writer = new CSSWriter(new CSSWriterSettings(ECSSVersion.LATEST, true));
s_aLogger.info(writer.getCSSAsString(cascadingStyleSheet));
}
Aggregations