Module: Redmine::WikiFormatting::CommonMark

Defined in:
lib/redmine/wiki_formatting/common_mark/helper.rb,
lib/redmine/wiki_formatting/common_mark/formatter.rb,
lib/redmine/wiki_formatting/common_mark/html_parser.rb,
lib/redmine/wiki_formatting/common_mark/markdown_filter.rb,
lib/redmine/wiki_formatting/common_mark/sanitization_filter.rb,
lib/redmine/wiki_formatting/common_mark/external_links_filter.rb,
lib/redmine/wiki_formatting/common_mark/append_spaces_to_lines.rb,
lib/redmine/wiki_formatting/common_mark/fixup_auto_links_filter.rb,
lib/redmine/wiki_formatting/common_mark/syntax_highlight_filter.rb

Defined Under Namespace

Modules: Helper Classes: AppendSpacesToLines, ExternalLinksFilter, FixupAutoLinksFilter, Formatter, HtmlParser, MarkdownFilter, SanitizationFilter, SyntaxHighlightFilter

Constant Summary collapse

PIPELINE_CONFIG =

configuration of the rendering pipeline

{
  # https://github.com/gjtorikian/commonmarker#extension-options
  commonmarker_extensions: {
    table: true,
    strikethrough: true,
    tagfilter: true,
    autolink: true,
    footnotes: true,
  }.freeze,

  # https://github.com/gjtorikian/commonmarker#parse-options
  commonmarker_parse_options: {
  }.freeze,

  # https://github.com/gjtorikian/commonmarker#render-options
  commonmarker_render_options: {
    unsafe: true,
    hardbreaks: Redmine::Configuration['common_mark_enable_hardbreaks'] == true,
  }.freeze,
  commonmarker_plugins: {
    syntax_highlighter: nil
  }.freeze,
}.freeze
MarkdownPipeline =
HTML::Pipeline.new [
  MarkdownFilter,
  SanitizationFilter,
  SyntaxHighlightFilter,
  FixupAutoLinksFilter,
  ExternalLinksFilter,
  TaskList::Filter
], PIPELINE_CONFIG