Sha256: 5442fa8696e98008e3c97cec7a8f59fd450fa9057e2c12beb7a2a09e2a00503c

Contents?: true

Size: 710 Bytes

Versions: 15

Compression:

Stored size: 710 Bytes

Contents

require "vimwiki_markdown/version"
require "vimwiki_markdown/options"
require "vimwiki_markdown/template"
require "vimwiki_markdown/vimwiki_link"
require "vimwiki_markdown/wiki_body"
require "vimwiki_markdown/exceptions"

module VimwikiMarkdown
  def self.convert_wikimarkdown_to_html
    ::I18n.enforce_available_locales = false

    options = Options.new
    template_html = Template.new(options)
    body_html = WikiBody.new(options)

    return if body_html.to_s =~ /%nohtml/

    combined_body_template = template_html.to_s.gsub('%content%', body_html.to_s)

    File.write(options.output_fullpath, combined_body_template)

  rescue MissingRequiredParamError => e
    warn e.message
    exit(0)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vimwiki_markdown-0.9.2 lib/vimwiki_markdown.rb
vimwiki_markdown-0.9.1 lib/vimwiki_markdown.rb
vimwiki_markdown-0.9.0 lib/vimwiki_markdown.rb
vimwiki_markdown-0.8.2 lib/vimwiki_markdown.rb
vimwiki_markdown-0.8.1 lib/vimwiki_markdown.rb
vimwiki_markdown-0.7.0 lib/vimwiki_markdown.rb
vimwiki_markdown-0.6.0 lib/vimwiki_markdown.rb
vimwiki_markdown-0.5.1 lib/vimwiki_markdown.rb
vimwiki_markdown-0.5.0 lib/vimwiki_markdown.rb
vimwiki_markdown-0.4.4 lib/vimwiki_markdown.rb
vimwiki_markdown-0.4.3 lib/vimwiki_markdown.rb
vimwiki_markdown-0.4.2 lib/vimwiki_markdown.rb
vimwiki_markdown-0.4.1 lib/vimwiki_markdown.rb
vimwiki_markdown-0.4.0 lib/vimwiki_markdown.rb
vimwiki_markdown-0.3.3 lib/vimwiki_markdown.rb