
+ Fixes `type` of `content` and `summary` entries - Removes `script` and `iframe` tags from entries content (from JSON feed too) There is actually an issue with Jekyll when using `capture` and incremental build. It was actually not related to `highlighter` config entry, so `f17a8ff3` has been partly reverted. An issue has been opened upstream ([jekyll/jekyll#8062]). From now, incremental build will be disabled.
13 lines
291 B
Ruby
13 lines
291 B
Ruby
|
|
# From <https://stackoverflow.com/a/25802375>.
|
|
module Jekyll
|
|
module RegexFilter
|
|
def re_substitute(input, reg_str, repl_str)
|
|
regexp = Regexp.new reg_str, Regexp::MULTILINE
|
|
input.gsub regexp, repl_str
|
|
end
|
|
end
|
|
end
|
|
|
|
Liquid::Template.register_filter(Jekyll::RegexFilter)
|