Sha256: 4d6fca6b4da59ae97288634eface1bf28fa5aead9f674e8736c976c3c8f45dea

Contents?: true

Size: 507 Bytes

Versions: 1

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

require "jekyll"
require "liquid"
require "word-to-markdown"

module Jekyll
  module W2M

    class Tag < Liquid::Tag
      def initialize(_tag_name, txt, _tokens)
        @context = txt
      end

      def render(_context)
        Jekyll::W2M.parse(@context)
      end
    end

    class << self
      def parse(file_path)
        WordToMarkown.new(file_path)
      end
    end

  end
end

Liquid::Template.register_tag("w2m", Jekyll::W2M::Tag)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-w2m-1.0.1 lib/jekyll-w2m.rb