Module: FujiMarkdown

Defined in:
lib/fuji_markdown.rb,
lib/fuji_markdown/error.rb,
lib/fuji_markdown/version.rb,
lib/fuji_markdown/processor.rb,
lib/fuji_markdown/preprocessors/ruby.rb,
lib/fuji_markdown/postprocessors/ruby.rb,
lib/fuji_markdown/renderers/text_renderer.rb,
lib/fuji_markdown/renderers/narou_renderer.rb,
lib/fuji_markdown/preprocessors/escape_narou.rb,
lib/fuji_markdown/renderers/kakuyomu_renderer.rb

Defined Under Namespace

Modules: Postprocessors, Preprocessors, Renderers Classes: Processor

Constant Summary collapse

Error =
Class.new(StandardError)
InvalidPresetError =
Class.new(StandardError)
VERSION =
'0.4.1'

Class Method Summary collapse

Class Method Details

.parse(text, preset = :HTML) ⇒ Object



14
15
16
17
# File 'lib/fuji_markdown.rb', line 14

def parse(text, preset = :HTML)
  options = build_options_from_preset(preset)
  Processor.new(**options).parse(text)
end

.render(text, preset = :HTML) ⇒ Object



19
20
21
22
# File 'lib/fuji_markdown.rb', line 19

def render(text, preset = :HTML)
  options = build_options_from_preset(preset)
  Processor.new(**options).render(text)
end