Module: CommonmarkerComrak::Config

Defined in:
lib/commonmarkercomrak/config.rb

Constant Summary collapse

OPTS =
{
  parse: {
    smart: false,
    default_info_string: "",
  }.freeze,
  render: {
    hardbreaks: true,
    github_pre_lang: true,
    width: 80,
    unsafe_: false,
    escape: false,
  }.freeze,
  extension: {
    strikethrough: true,
    tagfilter: true,
    table: true,
    autolink: true,
    tasklist: true,
    superscript: false,
    header_ids: "",
    footnotes: false,
    description_lists: false,
    front_matter_delimiter: "",
  },
  format: [:html].freeze,
}.freeze
BOOLS =
[true, false]

Class Method Summary collapse

Class Method Details

.merged_with_defaults(options) ⇒ Object



34
35
36
# File 'lib/commonmarkercomrak/config.rb', line 34

def self.merged_with_defaults(options)
  CommonmarkerComrak::Config::OPTS.merge(process_options(options))
end

.process_options(options) ⇒ Object



38
39
40
41
42
43
44
# File 'lib/commonmarkercomrak/config.rb', line 38

def self.process_options(options)
  {
    parse: process_parse_options(options[:parse]),
    render: process_render_options(options[:render]),
    extension: process_extension_options(options[:extension]),
  }
end