Class: Jekyll::Converters::SmartyPants

Inherits:
Jekyll::Converter show all
Defined in:
lib/jekyll/converters/smartypants.rb

Constant Summary

Constants inherited from Plugin

Plugin::PRIORITIES

Instance Method Summary collapse

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.



17
18
19
20
21
# File 'lib/jekyll/converters/smartypants.rb', line 17

def initialize(config)
  Jekyll::External.require_with_graceful_fail "kramdown"
  @config = config["kramdown"].dup || {}
  @config[:input] = :SmartyPants
end

Instance Method Details

#convert(content) ⇒ Object



31
32
33
# File 'lib/jekyll/converters/smartypants.rb', line 31

def convert(content)
  Kramdown::Document.new(content, @config).to_html.chomp
end

#matches(_) ⇒ Object



23
24
25
# File 'lib/jekyll/converters/smartypants.rb', line 23

def matches(_)
  false
end

#output_ext(_) ⇒ Object



27
28
29
# File 'lib/jekyll/converters/smartypants.rb', line 27

def output_ext(_)
  nil
end