lib/redcarpet.rb in redcarpet-2.0.0b3 vs lib/redcarpet.rb in redcarpet-2.0.0b4

- old
+ new

@@ -1,31 +1,12 @@ require 'redcarpet.so' module Redcarpet - VERSION = '2.0.0b3' + VERSION = '2.0.0b4' class Markdown - # Available Markdown extensions - attr_accessor :no_intra_emphasis - attr_accessor :tables - attr_accessor :fenced_code_blocks - attr_accessor :autolink - attr_accessor :strikethrough - attr_accessor :lax_html_blocks - attr_accessor :space_after_headers - attr_accessor :superscript - - attr_accessor :renderer - - def initialize(renderer, extensions={}) - if renderer.instance_of? Class - renderer = renderer.new - end - - @renderer = renderer - extensions.each_pair { |k, v| send("#{k}=", v) } - end + attr_reader :renderer end module Render # XHTML Renderer @@ -39,11 +20,11 @@ class SmartyHTML < HTML include SmartyPants end # SmartyPants Mixin module - # + # # Implements SmartyPants.postprocess, which # performs smartypants replacements on the HTML file, # once it has been fully rendered. # # To add SmartyPants postprocessing to your custom @@ -59,10 +40,10 @@ # include SmartyPants # # more code here # end # # # Standalone - # Redcarpet::Render::SmartyPants.postprocess("you're") + # Redcarpet::Render::SmartyPants.render("you're") # module SmartyPants extend self def self.render(text) postprocess text