Sha256: f7f220462b3cbb33f72105b0dd515353b2363da020f568ac3bd775c9d190cddc
Contents?: true
Size: 1.64 KB
Versions: 10
Compression:
Stored size: 1.64 KB
Contents
# frozen_string_literal: true require 'reverse_adoc' require 'stepmod/utils/converters/a' require 'stepmod/utils/converters/blockquote' require 'stepmod/utils/converters/br' require 'stepmod/utils/converters/bypass' require 'stepmod/utils/converters/code' require 'stepmod/utils/converters/drop' require 'stepmod/utils/converters/em_express_description' require 'stepmod/utils/converters/example' require 'stepmod/utils/converters/express_ref_express_description' require 'stepmod/utils/converters/ext_description' require 'stepmod/utils/converters/ext_descriptions' require 'stepmod/utils/converters/head' require 'stepmod/utils/converters/hr' require 'stepmod/utils/converters/ignore' require 'stepmod/utils/converters/note' require 'stepmod/utils/converters/p' require 'stepmod/utils/converters/pass_through' require 'stepmod/utils/converters/q' require 'stepmod/utils/converters/strong' require 'stepmod/utils/converters/sub' require 'stepmod/utils/converters/sup' require 'stepmod/utils/converters/text' require 'stepmod/utils/cleaner' module Stepmod module Utils class SmrlDescriptionConverter def self.convert(input, options = {}) root = if input.is_a?(String) then Nokogiri::XML(input).root elsif input.is_a?(Nokogiri::XML::Document) then input.root elsif input.is_a?(Nokogiri::XML::Node) then input end root || (return '') ReverseAdoc.config.with(options) do result = ReverseAdoc::Converters.lookup(root.name).convert(root) Stepmod::Utils::Cleaner.new.tidy(result) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems