Sha256: 4f22a1ebf69baca9e6efaaa0ec1a44399797f35d50bc984025d650447a7b0ae1
Contents?: true
Size: 506 Bytes
Versions: 13
Compression:
Stored size: 506 Bytes
Contents
module Govspeak module BlockquoteExtraQuoteRemover QUOTE = '"\u201C\u201D\u201E\u201F\u2033\u2036' LINE_BREAK = '\r\n?|\n' # used to remove quotes from a markdown blockquote, as these will be inserted # as part of the rendering # # for example: # > "test" # # will be formatted to: # > test def self.remove(source) return if source.nil? source.gsub(/^>[ \t]*[#{QUOTE}]*([^ \t\n].+?)[#{QUOTE}]*[ \t]*(#{LINE_BREAK}?)$/, '> \1\2') end end end
Version data entries
13 entries across 13 versions & 1 rubygems