Module: Commonmarker::Config
- Extended by:
- Utils
- Defined in:
- lib/commonmarker/config.rb
Constant Summary collapse
- OPTIONS =
{ parse: { smart: false, default_info_string: "", relaxed_autolinks: false, }.freeze, render: { hardbreaks: true, github_pre_lang: true, width: 80, unsafe: false, escape: false, sourcepos: false, escaped_char_spans: true, }.freeze, extension: { strikethrough: true, tagfilter: true, table: true, autolink: true, tasklist: true, superscript: false, header_ids: "", footnotes: false, description_lists: false, front_matter_delimiter: "", shortcodes: true, multiline_block_quotes: false, math_dollars: false, math_code: false, }, format: [:html].freeze, }.freeze
- PLUGINS =
{ syntax_highlighter: { theme: "base16-ocean.dark", path: "", }, }
Constants included from Constants
Commonmarker::Constants::BOOLS
Class Method Summary collapse
- .merged_with_defaults(options) ⇒ Object
- .process_options(options) ⇒ Object
- .process_plugins(plugins) ⇒ Object
Methods included from Utils
Class Method Details
.merged_with_defaults(options) ⇒ Object
51 52 53 |
# File 'lib/commonmarker/config.rb', line 51 def merged_with_defaults() Commonmarker::Config::OPTIONS.merge(()) end |
.process_options(options) ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/commonmarker/config.rb', line 55 def () { parse: ([:parse]), render: ([:render]), extension: ([:extension]), } end |
.process_plugins(plugins) ⇒ Object
63 64 65 66 67 |
# File 'lib/commonmarker/config.rb', line 63 def process_plugins(plugins) { syntax_highlighter: process_syntax_highlighter_plugin(plugins&.fetch(:syntax_highlighter, nil)), } end |