lib/kramdown/parser/kramdown/header.rb in kramdown-1.4.1 vs lib/kramdown/parser/kramdown/header.rb in kramdown-1.4.2
- old
+ new
@@ -32,10 +32,10 @@
end
define_parser(:setext_header, SETEXT_HEADER_START)
ATX_HEADER_START = /^\#{1,6}/
- ATX_HEADER_MATCH = /^(\#{1,6})(.+?)\s*?#*#{HEADER_ID}\s*?\n/
+ ATX_HEADER_MATCH = /^(\#{1,6})(.+?(?:\\#)?)\s*?#*#{HEADER_ID}\s*?\n/
# Parse the Atx header at the current location.
def parse_atx_header
return false if !after_block_boundary?