lib/markdown/wrapper.rb in markdown-0.2.0 vs lib/markdown/wrapper.rb in markdown-0.3.0
- old
+ new
@@ -39,10 +39,18 @@
@@config = Config.new
end
@@config.markdown_extnames
end
+ def self.filters
+ if @@config.nil?
+ @@config = Config.new
+ end
+ @@config.markdown_filters
+ end
+
+
def self.new( content, options={} )
## todo: allow options to pass in
## lets you change markdown engine/converter for every call
## e.g. lets you add config properties (as headers) to your document (for example)
@@ -53,10 +61,10 @@
lib = @@config.markdown_lib
mn = @@config.markdown_to_html_method # lets you use differnt options/converters for a single markdown lib
defaults = @@config.markdown_lib_defaults ## todo/fix: use mn / converter from defaults hash?? mn no longer needed??
- props = Props.new( options, 'USER', Props.new( defaults, 'SYSTEM' ))
+ props = Props.new( options, 'USER', Props.new( defaults, 'SYSTEM' ))
Wrapper.new( lib, mn, content, props )
end
end # module Markdown
\ No newline at end of file