This markup factory can be used to compress (minify) html markup.
To use it do the followings in your wicket Application:
@Override protected void init() { super.init(); getMarkupSettings().setMarkupFactory(new HtmlCompressingMarkupFactory()); }
Or if we want to preconfigure the compressor used:
@Override protected void init() { super.init(); HtmlCompressor compressor = new HtmlCompressor(); compressor.setPreserveLineBreaks(true); getMarkupSettings().setMarkupFactory(new HtmlCompressingMarkupFactory(compressor)); }
Overrides {@link #newXmlPullParser()} to use {@link HtmlCompressingXmlPullParser}.
@author akiraly
|
|