class Tilt::PandocTemplate

def pandoc_options

Leave other hash keys untouched
Remove hash keys with value false
Replace hash keys with value true with symbol for key
Map tilt options to pandoc options
turn options hash into an array
def pandoc_options
  result = []
  from = "markdown"
  smart_extension = "-smart"
  options.each do |k,v|
    case k
    when :smartypants
      smart_extension = "+smart" if v
    when :escape_html
      from = "markdown-raw_html" if v
    when :commonmark
      from = "commonmark" if v
    when :markdown_strict
      from = "markdown_strict" if v
    else
      case v
      when true
        result << k
      when false
        # do nothing
      else
        result << { k => v }
      end
    end
  end
  result << { :f => from + smart_extension }
  result
end