Sha256: 778d3c6df59e5bd54cbf366c51703e6c6cbef84374ca50692e43150e14843bc4

Contents?: true

Size: 773 Bytes

Versions: 7

Compression:

Stored size: 773 Bytes

Contents

# frozen_string_literal: true

class Kramdown::Parser::SmartyPants < Kramdown::Parser::Kramdown
  def initialize(source, options)
    super
    @block_parsers = [:block_html]
    @span_parsers =  [:smart_quotes, :html_entity, :typographic_syms, :span_html]
  end
end

module Jekyll
  module Converters
    class SmartyPants < Converter
      safe true
      priority :low

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

      def matches(_)
        false
      end

      def output_ext(_)
        nil
      end

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

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
jekyll-3.6.3 lib/jekyll/converters/smartypants.rb
jekyll-docs-3.6.2 lib/jekyll/converters/smartypants.rb
jekyll-docs-3.6.1 lib/jekyll/converters/smartypants.rb
jekyll-3.6.2 lib/jekyll/converters/smartypants.rb
jekyll-3.6.1 lib/jekyll/converters/smartypants.rb
jekyll-3.6.0 lib/jekyll/converters/smartypants.rb
jekyll-3.6.0.pre.beta1 lib/jekyll/converters/smartypants.rb