Module: Middleman::Vegas::RedcarpetCodeRenderer
- Defined in:
- lib/middleman-vegas/redcarpet_code_renderer.rb
Overview
A mixin for the Redcarpet Markdown renderer that will assist in finding codeblocks and replacing them with rendered HTML.
Instance Method Summary collapse
-
#preprocess(full_document) ⇒ Object
Traditionally you would enable code fences in RedCarpet and then process it with #block_code function.
Instance Method Details
#preprocess(full_document) ⇒ Object
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.
15 16 17 |
# File 'lib/middleman-vegas/redcarpet_code_renderer.rb', line 15 def preprocess(full_document) MarkdownParser.parse_document full_document end |