Class: Pandocomatic::MetadataPreprocessor

Inherits:
Processor
  • Object
show all
Defined in:
lib/pandocomatic/processors/metadata_preprocessor.rb

Overview

MetadataPreprocessor mixes in the metadata section of a template into a document before pandoc is run to convert that document. It is a default preprocessor.

Class Method Summary collapse

Class Method Details

.run(input, metadata = {}) ⇒ Object

Run this MetadataPreprocessor

Parameters:

  • input (String)

    the contents of the document that is being preprocessed

  • metadata (Hash = {}) (defaults to: {})

    the metadata to mix-in



34
35
36
37
38
39
# File 'lib/pandocomatic/processors/metadata_preprocessor.rb', line 34

def self.run(input,  = {})
  output = input
  output << "\n\n"
  output << YAML.dump()
  output << "...\n\n"
end