Sha256: 182573c25699ae75f2bcf5f749397c6301c02f0a7db1be6d1de7eef659edff44
Contents?: true
Size: 510 Bytes
Versions: 1
Compression:
Stored size: 510 Bytes
Contents
# # #- foo # 1 + 2 # # ↓ # # foo # # ```ruby # 1 + 2 # ``` # module Source2MD module Type class ElementHeaderComment < Base def self.accept?(element) element.body.match?(/^#-/) end def to_md [ message, "```ruby", body, "```", ] * "\n" end private def message element.body.scan(/^#-\s*(.*)/).join end def body element.body.gsub(/^#-.*\R/, "") end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
source2md-0.0.1 | lib/source2md/type/__element_header_comment.rb |