module Middleman::Vegas::RedcarpetCodeRenderer
A mixin for the Redcarpet Markdown renderer that will assist in finding codeblocks and replacing them with rendered HTML.
Public Instance Methods
preprocess(full_document)
click to toggle source
Traditionally you would enable code fences in RedCarpet and then process it with block_code function. But code blocks parsed that way will not allow you to define metadata. So the entire document needs to be examined.
@see Middleman::Vegas::MarkdownParser
# File lib/middleman-vegas/redcarpet_code_renderer.rb, line 15 def preprocess(full_document) MarkdownParser.parse_document full_document end