Sha256: 64af51d3d265a0d34e133da8c0795261c0daf859f5350766382b276eefe67600
Contents?: true
Size: 420 Bytes
Versions: 5
Compression:
Stored size: 420 Bytes
Contents
require 'nishisuke_blog_syntax/formatter' module NishisukeBlogSyntax module Formatter class HeadThreeFormatter < FormatterBase SUBSTITUTE_REGEXP = /^### .*$/ PARSE_REGEXP = /^### (.*)$/ private def regexp SUBSTITUTE_REGEXP end def substitute(matched) content_str = matched.match(PARSE_REGEXP)[1] "<h3>#{content_str}</h3>" end end end end
Version data entries
5 entries across 5 versions & 2 rubygems