Class: Kramdown::Parser::SmartyPants

Inherits:
Kramdown
  • Object
show all
Defined in:
lib/bridgetown-core/utils/smarty_pants_converter.rb

Instance Method Summary collapse

Constructor Details

#initialize(source, options) ⇒ SmartyPants

Returns a new instance of SmartyPants.



6
7
8
9
10
# File 'lib/bridgetown-core/utils/smarty_pants_converter.rb', line 6

def initialize(source, options)
  super
  @block_parsers = [:block_html, :content]
  @span_parsers =  [:smart_quotes, :html_entity, :typographic_syms, :span_html]
end

Instance Method Details

#parse_contentObject



12
13
14
# File 'lib/bridgetown-core/utils/smarty_pants_converter.rb', line 12

def parse_content
  add_text @src.scan(%r!\A.*\n!)
end