replace-regex.rb 232 B

12345678910
  1. module Jekyll
  2. module RegexFilter
  3. def replace_regex(input, regex_string, replace_string)
  4. regex = Regexp.new regex_string
  5. input.gsub regex, replace_string
  6. end
  7. end
  8. end
  9. Liquid::Template.register_filter(Jekyll::RegexFilter)