5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 02:56:22 +00:00
panel/config/initializers/commonmarker.rb

19 lines
337 B
Ruby
Raw Normal View History

2018-02-23 19:12:39 +00:00
require 'commonmarker'
module Haml::Filters
remove_filter("Markdown") #remove the existing Markdown filter
module Markdown
include Haml::Filters::Base
def render(text)
CommonMarker.render_html(text,
[:TABLE_PREFER_STYLE_ATTRIBUTES],
[:table,:strikethrough,:autolink,:tagfilter])
end
end
end