module Jekyll

Public Class Methods

get_dir(page_type, config) click to toggle source
# File lib/utils.rb, line 5
def self.get_dir(page_type, config)
  config.fetch('ramler_generated_sub_dirs', {}).fetch(page_type, page_type)
end
sanatize_json_string(s) click to toggle source
# File lib/utils.rb, line 9
def self.sanatize_json_string(s)
    # This use to do something. Hopefully someday it will do something again
    # See strip_newlines
    s
end
strip_newlines(s) click to toggle source
# File lib/utils.rb, line 15
def self.strip_newlines(s)
  # Assuming Markdown, so do NOT remove consecutive newlines
  # TODO Also do not remove newlines at end of list items
  regex = /([^\n])\n([^\n])/
  s.gsub(regex, '\1 \2').strip
end