Sha256: 35bb1103f42e7914dc06fdaa54993bf895a51c1acd39b26b08ba75bcb13e3095

Contents?: true

Size: 302 Bytes

Versions: 4

Compression:

Stored size: 302 Bytes

Contents

module Source2MD
  module Type
    class ElementDeepComment < Base
      def self.accept?(element)
        element.body.match?(/^##/)
      end

      def to_md
        CodeBlock.new(body).to_md
      end

      private

      def body
        element.body.gsub(/^##/, "#")
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
source2md-0.0.4 lib/source2md/type/element_deep_comment.rb
source2md-0.0.3 lib/source2md/type/element_deep_comment.rb
source2md-0.0.2 lib/source2md/type/element_deep_comment.rb
source2md-0.0.1 lib/source2md/type/element_deep_comment.rb