Module: Markdown
- Defined in:
- lib/markdown.rb,
lib/markdown/config.rb,
lib/markdown/cli/gen.rb,
lib/markdown/version.rb,
lib/markdown/wrapper.rb,
lib/markdown/cli/opts.rb,
lib/markdown/cli/runner.rb,
lib/markdown/engines/maruku.rb,
lib/markdown/engines/kramdown.rb,
lib/markdown/engines/bluecloth.rb,
lib/markdown/engines/rdiscount.rb,
lib/markdown/engines/redcarpet.rb,
lib/markdown/engines/pandoc_ruby.rb,
lib/markdown/engines/rpeg_markdown.rb
Defined Under Namespace
Modules: Engine
Classes: Config, Gen, Opts, Runner, Wrapper
Constant Summary
collapse
- VERSION =
'1.0.0'
- @@config =
nil
Class Method Summary
collapse
Class Method Details
.banner ⇒ Object
version string for generator meta tag (includes ruby version)
50
51
52
|
# File 'lib/markdown.rb', line 50
def self.banner
"markdown #{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
end
|
.dump ⇒ Object
dump settings for debug/verbose flag
51
52
53
54
55
56
|
# File 'lib/markdown/wrapper.rb', line 51
def self.dump if @@config.nil?
@@config = Config.new
end
@@config.dump
end
|
.extnames ⇒ Object
37
38
39
40
41
42
|
# File 'lib/markdown/wrapper.rb', line 37
def self.extnames
if @@config.nil?
@@config = Config.new
end
@@config.markdown_extnames
end
|
.filters ⇒ Object
44
45
46
47
48
49
|
# File 'lib/markdown/wrapper.rb', line 44
def self.filters
if @@config.nil?
@@config = Config.new
end
@@config.markdown_filters
end
|
.lib ⇒ Object
30
31
32
33
34
35
|
# File 'lib/markdown/wrapper.rb', line 30
def self.lib
if @@config.nil?
@@config = Config.new
end
@@config.markdown_lib
end
|
.lib=(value) ⇒ Object
26
27
28
|
# File 'lib/markdown/wrapper.rb', line 26
def self.lib=( value )
end
|
.main ⇒ Object
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/markdown.rb', line 54
def self.main
markdownopt = ENV[ 'MARKDOWNOPT' ]
args = []
args += markdownopt.split if markdownopt
args += ARGV.dup
Runner.new.run(args)
end
|
.new(content, options = {}) ⇒ Object
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# File 'lib/markdown/wrapper.rb', line 59
def self.new( content, options={} )
if @@config.nil?
@@config = Config.new
end
lib = @@config.markdown_lib
mn = @@config.markdown_to_html_method defaults = @@config.markdown_lib_defaults
props = Props.new( options, 'USER', Props.new( defaults, 'SYSTEM' ))
Wrapper.new( lib, mn, content, props )
end
|