Class: PandocFilter

Inherits:
Nanoc3::Filter
  • Object
show all
Defined in:
lib/filters/pandoc.rb

Instance Method Summary collapse

Instance Method Details

#run(content, params = {}) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/filters/pandoc.rb', line 12

def run(content, params={})
  input_file = Tempfile.new('input')

  input_file << content
  input_file.close

  output = `pandoc -f markdown -t textile -5 #{input_file.path}`

  return output

end