Class: Kramdown::Parser::KramdownExt
- Inherits:
-
Kramdown
- Object
- Kramdown
- Kramdown::Parser::KramdownExt
- Defined in:
- lib/tty/markdown/kramdown_ext.rb
Constant Summary collapse
- FENCED_CODEBLOCK_START =
/^[ ]{0,3}[~`]{3,}/.freeze
- FENCED_CODEBLOCK_MATCH =
/^[ ]{0,3}(([~`]){3,})\s*?((\S+?)(?:\?\S*)?)?\s*?\n(.*?)^[ ]{0,3}\1\2*\s*?\n/m.freeze
Instance Method Summary collapse
-
#initialize(source, options) ⇒ KramdownExt
constructor
A new instance of KramdownExt.
Constructor Details
#initialize(source, options) ⇒ KramdownExt
Returns a new instance of KramdownExt.
8 9 10 11 12 13 14 |
# File 'lib/tty/markdown/kramdown_ext.rb', line 8 def initialize(source, ) super { codeblock_fenced: :codeblock_fenced_ext }.each do |current, replacement| @block_parsers[@block_parsers.index(current)] = replacement end end |