5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 23:16:22 +00:00
panel/config/initializers/commonmarker.rb
2019-03-26 12:32:20 -03:00

17 lines
410 B
Ruby

# frozen_string_literal: true
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],
%i[table strikethrough autolink tagfilter])
end
end
end