Method: Convert.run
- Defined in:
- lib/convert.rb
.run(string, options = {}) ⇒ Object
Run all the converters or the ones you sent to the initializers
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/convert.rb', line 39 def self.run(string, = {}) return '' if !string # Setup = {:markdown => true, :config => :custom, :converters => DEFAULT}.merge() # Include [:converters] += [:include] if [:include] # Exclude [:converters] -= [:exclude] if [:exclude] # Markdown string = markdown(string, :autolink => false) if [:markdown] # Scan string = scan(string, ) # Sanitize string = sanitize(string, :config => [:config]) string end |