Skip to content

Commit 9b5f7d5

Browse files
committed
commonmarker 2.0 (2)
1 parent eaf5e49 commit 9b5f7d5

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

app/models/concerns/markdown_body.rb

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,29 @@ def html
88
end
99

1010
def render_html
11-
CommonMarker.render_html(body, %i(GITHUB_PRE_LANG), %i(tagfilter autolink table strikethrough))
11+
Commonmarker.to_html(
12+
body,
13+
options: {
14+
render: {
15+
unsafe: true,
16+
},
17+
extension: {
18+
strikethrough: true,
19+
tagfilter: false,
20+
table: true,
21+
autolink: true,
22+
tasklist: true,
23+
superscript: true,
24+
header_ids: "#{self.id}--",
25+
footnotes: true,
26+
description_lists: true,
27+
front_matter_delimiter: '---',
28+
shortcodes: true,
29+
},
30+
},
31+
plugins: {
32+
syntax_highlighter: nil,
33+
},
34+
)
1235
end
1336
end

0 commit comments

Comments
 (0)