Class: Kramdown::Parser::KramdownYamlTablerize
- Inherits:
-
Kramdown
- Object
- Kramdown
- Kramdown::Parser::KramdownYamlTablerize
- Defined in:
- lib/kramdown-tablerize/kramdown.rb
Constant Summary collapse
- YAML_TABLE_PATTERN =
/^#{OPT_SPACE}---[ \t]*table[ \t]*---(.*?)---[ \t]*\/table[ \t]*---/m
Instance Method Summary collapse
-
#initialize(source, options) ⇒ KramdownYamlTablerize
constructor
A new instance of KramdownYamlTablerize.
-
#parse_yaml_tablerize ⇒ Object
private
Convert Markdown -> :yaml_tablerize.
Constructor Details
#initialize(source, options) ⇒ KramdownYamlTablerize
Returns a new instance of KramdownYamlTablerize.
41 42 43 44 |
# File 'lib/kramdown-tablerize/kramdown.rb', line 41 def initialize(source, ) super @block_parsers.unshift(:yaml_tablerize) end |
Instance Method Details
#parse_yaml_tablerize ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Convert Markdown -> :yaml_tablerize
48 49 50 51 |
# File 'lib/kramdown-tablerize/kramdown.rb', line 48 def parse_yaml_tablerize @src.pos += @src.matched_size @tree.children << Element.new(:yaml_tablerize, @src[1]) end |