# https://github.com/gjtorikian/commonmarker#render-options
commonmarker_render_options: {
unsafe: true,
- hardbreaks: Redmine::Configuration['common_mark_enable_hardbreaks'] == true ? true : false,
+ hardbreaks: Redmine::Configuration['common_mark_enable_hardbreaks'] == true,
}.freeze,
commonmarker_plugins: {
syntax_highlighter: nil
def call
html = Commonmarker.to_html(@text, options: {
- extension: extensions,
+ extension: extensions,
render: render_options,
parse: parse_options
- }, plugins: plugins )
+ }, plugins: plugins)
html.rstrip!
html