Class: RedcarpetCompat

Inherits:
Redcarpet show all
Defined in:
lib/redcarpet.rb

Overview

Compatibility class; Creates a instance of Redcarpet with all markdown extensions enabled, same behavior as in RDiscount

Constant Summary

Constants inherited from Redcarpet

Redcarpet::VERSION

Instance Attribute Summary collapse

Attributes inherited from Redcarpet

#autolink, #fenced_code, #filter_html, #filter_styles, #generate_toc, #gh_blockcode, #hard_wrap, #lax_htmlblock, #no_image, #no_intraemphasis, #no_links, #safelink, #smart, #space_header, #strikethrough, #tables, #text, #xhtml

Instance Method Summary collapse

Methods inherited from Redcarpet

#to_html, #toc_content

Constructor Details

#initialize(text, *extensions) ⇒ RedcarpetCompat

Returns a new instance of RedcarpetCompat.



103
104
105
106
107
108
109
# File 'lib/redcarpet.rb', line 103

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

Instance Attribute Details

#fold_linesObject

Backwards compatibility



98
99
100
# File 'lib/redcarpet.rb', line 98

def fold_lines
  @fold_lines
end

#no_tablesObject

Returns the value of attribute no_tables.



99
100
101
# File 'lib/redcarpet.rb', line 99

def no_tables
  @no_tables
end

#strictObject

Returns the value of attribute strict.



101
102
103
# File 'lib/redcarpet.rb', line 101

def strict
  @strict
end