删除<pre> blocks?

时间:2016-06-06 14:15:32

标签: ruby regex jekyll

In my Ruby codes I'm removing all new lines, tabs and HTML comments.

But when I do this all the codes inside 3-element Array{Any,1}: [1.0,1.5] [1.0] [2.3,4.2,1.0] turning one line too.

<pre>

How can I modify this regex to only work outside module Jekyll module HtmlCompressor def htmlCompressor(data) data.gsub("\n", "").gsub("\t", "").gsub(/<!--(?!<!)[^\[>].*?-->/, "") end end end Liquid::Template.register_filter(Jekyll::HtmlCompressor) blocks?

0 个答案:

没有答案