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_links, #safelink, #smart, #strict, #strikethrough, #tables, #text

Instance Method Summary collapse

Methods inherited from Redcarpet

#to_html, #toc_content

Constructor Details

#initialize(text, *extensions) ⇒ RedcarpetCompat

Returns a new instance of RedcarpetCompat.



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

def initialize(text, *extensions)
  super(text, *extensions)
  self.tables = !self.no_tables
  self.strikethrough = true
end

Instance Attribute Details

#fold_linesObject

Backwards compatibility



92
93
94
# File 'lib/redcarpet.rb', line 92

def fold_lines
  @fold_lines
end

#no_tablesObject

Returns the value of attribute no_tables.



93
94
95
# File 'lib/redcarpet.rb', line 93

def no_tables
  @no_tables
end