lib/redcarpet.rb in redcarpet-1.1.1 vs lib/redcarpet.rb in redcarpet-1.2.0
- old
+ new
@@ -24,11 +24,11 @@
# rescue LoadError
# require 'bluecloth'
# end
#
class Redcarpet
- VERSION = '1.1.1'
+ VERSION = '1.2.0'
# Original Markdown formatted text.
attr_reader :text
# Set true to have smarty-like quote translation performed.
@@ -55,16 +55,15 @@
attr_accessor :autolink
# Don't make hyperlinks from <tt>[][]</tt> links that have unknown URL types.
attr_accessor :safelink
+ # Add TOC anchors to every header
+ attr_accessor :generate_toc
+
def initialize(text, *extensions)
@text = text
extensions.each { |e| send("#{e}=", true) }
- end
-
- def generate_toc
- raise NotImplementedError
end
end
Markdown = Redcarpet unless defined? Markdown