Module: Jekyll::LiquidMatchFilter

Defined in:
lib/jekyll-theme-endless.rb,
lib/jekyll-theme-endless/liquid-match-filter.rb

Overview

Namespace for custom Liquid filters

Instance Method Summary collapse

Instance Method Details

#match(input, regex) ⇒ Object



3
4
5
6
7
8
# File 'lib/jekyll-theme-endless/liquid-match-filter.rb', line 3

def match(input, regex)
result = input.match(Regexp.new(regex)) ? true : false
Jekyll.logger.debug("LiquidMatchFilter", "[DEBUG] Match-filter called with input '#{input}' and regex '#{regex}' returns #{result}")
# return the result
result
end