Class: Jekyll::Converters::SmartyPants
- Inherits:
-
Jekyll::Converter
- Object
- Plugin
- Jekyll::Converter
- Jekyll::Converters::SmartyPants
- Defined in:
- lib/jekyll/converters/smartypants.rb
Constant Summary
Constants inherited from Plugin
Instance Method Summary collapse
- #convert(content) ⇒ Object
-
#initialize(config) ⇒ SmartyPants
constructor
A new instance of SmartyPants.
- #matches(_) ⇒ Object
- #output_ext(_) ⇒ Object
Methods inherited from Jekyll::Converter
highlighter_prefix, #highlighter_prefix, highlighter_suffix, #highlighter_suffix
Methods inherited from Plugin
#<=>, <=>, catch_inheritance, descendants, inherited, priority, safe
Constructor Details
#initialize(config) ⇒ SmartyPants
Returns a new instance of SmartyPants.
15 16 17 18 19 |
# File 'lib/jekyll/converters/smartypants.rb', line 15 def initialize(config) Jekyll::External.require_with_graceful_fail "kramdown" @config = config["kramdown"].dup || {} @config[:input] = :SmartyPants end |
Instance Method Details
#convert(content) ⇒ Object
29 30 31 |
# File 'lib/jekyll/converters/smartypants.rb', line 29 def convert(content) Kramdown::Document.new(content, @config).to_html.chomp end |
#matches(_) ⇒ Object
21 22 23 |
# File 'lib/jekyll/converters/smartypants.rb', line 21 def matches(_) false end |
#output_ext(_) ⇒ Object
25 26 27 |
# File 'lib/jekyll/converters/smartypants.rb', line 25 def output_ext(_) nil end |