Sha256: a88d1d08fc6c9c5f3a3589a68f300469817a18a9d0de766502704c0ef5562287

Contents?: true

Size: 432 Bytes

Versions: 5

Compression:

Stored size: 432 Bytes

Contents

# frozen_string_literal: true

require 'stepmod/utils/converters/em'

module Stepmod
  module Utils
    module Converters
      class Stem < ReverseAsciidoctor::Converters::Base
        def convert(node, state = {})
          return Em.new.convert(node, state) if node.text.strip.length > 8

          " stem:[#{node.text.strip}] "
        end
      end

      ReverseAsciidoctor::Converters.register :i, Stem.new
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stepmod-utils-0.1.5 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.1.4 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.1.3 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.1.2 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.1.1 lib/stepmod/utils/converters/stem.rb