lib/lookbook/markdown.rb in lookbook-1.0.0.beta.4 vs lib/lookbook/markdown.rb in lookbook-1.0.0.beta.5
- old
+ new
@@ -6,13 +6,15 @@
tables: true,
fenced_code_blocks: true,
disable_indented_code_blocks: true,
strikethrough: true,
highlight: true,
- with_toc_data: true
+ with_toc_data: true,
+ lax_spacing: true
}
def self.render(text)
+ text&.gsub!(/\<\!\-\- (BEGIN|END) (.*) \-\-\>/, "")
markdown = Redcarpet::Markdown.new(Renderer, Lookbook.config.markdown_options)
markdown.render(text).html_safe
end
class Renderer < Redcarpet::Render::HTML