Class: Kramdown::Parser::SmartyPants
- Inherits:
-
Kramdown
- Object
- Kramdown
- Kramdown::Parser::SmartyPants
- Defined in:
- bridgetown-core/lib/bridgetown-core/utils/smarty_pants_converter.rb
Instance Method Summary collapse
-
#initialize(source, options) ⇒ SmartyPants
constructor
A new instance of SmartyPants.
-
#parse_content ⇒ Object
Constructor Details
#initialize(source, options) ⇒ SmartyPants
Returns a new instance of SmartyPants.
6 7 8 9 10 |
# File 'bridgetown-core/lib/bridgetown-core/utils/smarty_pants_converter.rb', line 6 def initialize(source, ) super @block_parsers = [:block_html, :content] @span_parsers = [:smart_quotes, :html_entity, :typographic_syms, :span_html] end |
Instance Method Details
#parse_content ⇒ Object
12 13 14 |
# File 'bridgetown-core/lib/bridgetown-core/utils/smarty_pants_converter.rb', line 12 def parse_content add_text @src.scan(%r!\A.*\n!) end |