Class: Pandocomatic::MetadataPreprocessor
- 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
-
.run(input, metadata = {}) ⇒ Object
Run this MetadataPreprocessor.
Class Method Details
.run(input, metadata = {}) ⇒ Object
Run this MetadataPreprocessor
34 35 36 37 38 39 40 41 |
# File 'lib/pandocomatic/processors/metadata_preprocessor.rb', line 34 def self.run(input, = {}) yaml = YAML.dump() Pandocomatic::LOG.debug ' | MetadataPreprocessor. Adding mined YAML blocks to metadata:' \ "#{Pandocomatic::LOG.indent( yaml.sub('---', ''), 37 )}" "#{input}\n\n#{yaml}...\n\n" end |