lib/redcarpet.rb in redcarpet-1.11.4 vs lib/redcarpet.rb in redcarpet-1.12.0

- old
+ new

@@ -24,11 +24,11 @@ # rescue LoadError # require 'bluecloth' # end # class Redcarpet - VERSION = '1.11.4' + VERSION = '1.12.0' # Original Markdown formatted text. attr_reader :text # Set true to have smarty-like quote translation performed. @@ -47,13 +47,10 @@ attr_accessor :no_links # Treat newlines in paragraphs as real line breaks, GitHub style attr_accessor :hard_wrap - # Disable relaxed emphasis processing. - attr_accessor :strict - # Generate safer HTML for code blocks (no custom CSS classes) attr_accessor :gh_blockcode # Don't make hyperlinks from <tt>[][]</tt> links that have unknown URL types. attr_accessor :safelink @@ -74,10 +71,13 @@ attr_accessor :fenced_code # Allow HTML blocks inside of paragraphs without being surrounded by newlines attr_accessor :lax_htmlblock + # Do not render emphasis_inside_words + attr_accessor :no_intraemphasis + def initialize(text, *extensions) @text = text extensions.each { |e| send("#{e}=", true) } end end @@ -90,15 +90,17 @@ class RedcarpetCompat < Redcarpet # Backwards compatibility attr_accessor :fold_lines attr_accessor :no_tables attr_accessor :fold_lines + attr_accessor :strict def initialize(text, *extensions) super(text, *extensions) self.tables = !self.no_tables self.strikethrough = true self.lax_htmlblock = true + self.no_intraemphasis = !self.strict end end require 'redcarpet.so'