Sha256: 801689353968d3456678b555d16c8b5880600ec6bffd61cd24fbc8ff3a44f444

Contents?: true

Size: 308 Bytes

Versions: 5

Compression:

Stored size: 308 Bytes

Contents

module InlineSvg::TransformPipeline
  module Transformations
    class NoComment < Transformation
      def transform(doc)
        doc = Nokogiri::XML::Document.parse(doc.to_html)
        doc.xpath("//comment()").each do |comment|
          comment.remove
        end
        doc
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
inline_svg-1.2.1 lib/inline_svg/transform_pipeline/transformations/no_comment.rb
inline_svg-1.2.0 lib/inline_svg/transform_pipeline/transformations/no_comment.rb
inline_svg-1.1.0 lib/inline_svg/transform_pipeline/transformations/no_comment.rb
inline_svg-1.0.1 lib/inline_svg/transform_pipeline/transformations/no_comment.rb
inline_svg-1.0.0 lib/inline_svg/transform_pipeline/transformations/no_comment.rb