Class: Gimli::Markup::YamlFrontmatterRemover

Inherits:
Object
  • Object
show all
Defined in:
lib/gimli/markup/yaml_frontmatter_remover.rb

Overview

Class that knows how to remove yaml front matter

Instance Method Summary collapse

Instance Method Details

#process(data) ⇒ Object

Removes YAML Front Matter Useful if you want to PDF your Jekyll site.



12
13
14
# File 'lib/gimli/markup/yaml_frontmatter_remover.rb', line 12

def process(data)
  data.gsub /^(---\s*\n.*?\n?)^(---\s*$\n?)/m, ''
end