Sha256: b12df37ec91f6de59985739cd0b2ad15858350d6c691997e9c1bee5caf27ab79
Contents?: true
Size: 314 Bytes
Versions: 2
Compression:
Stored size: 314 Bytes
Contents
module Mdoc class Processor class AddTitle < Processor def process!(doc) title = doc.title if title unless doc.body =~ /^\s*\#*\s*#{title}/ title = '# ' + title + "\n\n" doc.body = title + doc.body end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mdoc-0.0.6 | lib/mdoc/processor/add_title.rb |
mdoc-0.0.5 | lib/mdoc/processor/add_title.rb |