lib/metadown/renderer.rb
# This hook is provided to us by Redcarpet. We get access
# to the whole text before anything else kicks off, which
# means we can snag out the YAML at the beginning.
This hook is provided to us by Redcarpet. We get access
to the whole text before anything else kicks off, which
means we can snag out the YAML at the beginning.
This hook is provided to us by Redcarpet . We get access to the whole text before anything else kicks off which means we can snag out the YAML at the beginning .
def preprocess(full_document)
      full_document =~ /^(---\s*\n.*?\n?)^(---\s*$\n?)/m
      @metadata = YAML.load($1) if $1
      $' or full_document
    end
def preprocess ( full_document ) full_document =~ / ^(--- \s * \n .*? \n ?)^(--- \s *$ \n ?) /m @metadata = YAML . load ( $1 ) if $1 $' or full_document end
This hook is provided to us by Redcarpet.
This hook is provided to us by Redcarpet .
full_document