当前位置: 首页>>代码示例>>Java>>正文


Java HtmlCompressor.setRemoveIntertagSpaces方法代码示例

本文整理汇总了Java中com.googlecode.htmlcompressor.compressor.HtmlCompressor.setRemoveIntertagSpaces方法的典型用法代码示例。如果您正苦于以下问题:Java HtmlCompressor.setRemoveIntertagSpaces方法的具体用法?Java HtmlCompressor.setRemoveIntertagSpaces怎么用?Java HtmlCompressor.setRemoveIntertagSpaces使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.googlecode.htmlcompressor.compressor.HtmlCompressor的用法示例。


在下文中一共展示了HtmlCompressor.setRemoveIntertagSpaces方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: process

import com.googlecode.htmlcompressor.compressor.HtmlCompressor; //导入方法依赖的package包/类
public String process(String src) {
    HtmlCompressor compressor = new HtmlCompressor();
    compressor.setEnabled(true);
    compressor.setCompressCss(false);
    compressor.setCompressJavaScript(false);

    compressor.setGenerateStatistics(false);

    compressor.setRemoveComments(options.isRemoveComments());
    compressor.setRemoveMultiSpaces(options.isRemoveMutliSpaces());
    compressor.setRemoveIntertagSpaces(options.isRemoveIntertagSpaces());
    compressor.setRemoveQuotes(options.isRemoveQuotes());
    compressor.setSimpleDoctype(options.isSimpleDoctype());
    compressor.setRemoveScriptAttributes(options.isRemoveScriptAttributes());
    compressor.setRemoveStyleAttributes(options.isRemoveStyleAttributes());
    compressor.setRemoveLinkAttributes(options.isRemoveLinkAttributes());
    compressor.setRemoveFormAttributes(options.isRemoveFormAttributes());
    compressor.setRemoveInputAttributes(options.isRemoveInputAttributes());
    compressor.setSimpleBooleanAttributes(options.isSimpleBooleanAttributes());
    compressor.setRemoveJavaScriptProtocol(options.isRemoveJavaScriptProtocol());
    compressor.setRemoveHttpProtocol(options.isRemoveHttpProtocol());
    compressor.setRemoveHttpsProtocol(options.isRemoveHttpsProtocol());
    compressor.setPreserveLineBreaks(options.isPreserveLineBreaks());

    return compressor.compress(src);
}
 
开发者ID:instant-solutions,项目名称:gradle-website-optimizer,代码行数:27,代码来源:HtmlProcessor.java

示例2: save

import com.googlecode.htmlcompressor.compressor.HtmlCompressor; //导入方法依赖的package包/类
public void save() throws IOException {
	String content = core.toString();
	if (JRenderConfig.Server.View.useMinified) {
		HtmlCompressor html = new HtmlCompressor();
		html.setRemoveIntertagSpaces(true);
		content = html.compress(content);
	}
	FileUtils.createFile(content, jrenderPath + "/core.js");
}
 
开发者ID:mehah,项目名称:jRender,代码行数:10,代码来源:CoreFileJS.java


注:本文中的com.googlecode.htmlcompressor.compressor.HtmlCompressor.setRemoveIntertagSpaces方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。