Sha256: c655551c5f01f5d0d24dde23149de06e8933f14962f849425ef790f922d0ae28
Contents?: true
Size: 432 Bytes
Versions: 29
Compression:
Stored size: 432 Bytes
Contents
# frozen_string_literal: true module Tocer module Parsers # Represents a Markdown header. class Header PUNCTUATION = "#" def initialize markdown @markdown = markdown end def prefix String markdown[/#{PUNCTUATION}{1,}/] end def content markdown[prefix.length + 1, markdown.length].strip end private attr_reader :markdown end end end
Version data entries
29 entries across 29 versions & 1 rubygems