fyntech/fyntech

View on GitHub
_plugins/replace.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Jekyll
  module RegexFilter
    def replace_regex(input, reg_str, repl_str)
      re = Regexp.new reg_str, Regexp::MULTILINE

      # This will be returned
      input.gsub re, repl_str
    end
  end
end

Liquid::Template.register_filter(Jekyll::RegexFilter)