lib/kramdown/parser/kramdown/codeblock.rb in kramdown-1.6.0 vs lib/kramdown/parser/kramdown/codeblock.rb in kramdown-1.7.0
- old
+ new
@@ -30,10 +30,10 @@
end
define_parser(:codeblock, CODEBLOCK_START)
FENCED_CODEBLOCK_START = /^~{3,}/
- FENCED_CODEBLOCK_MATCH = /^((~){3,})\s*?(\w+)?\s*?\n(.*?)^\1\2*\s*?\n/m
+ FENCED_CODEBLOCK_MATCH = /^((~){3,})\s*?(\w[\w-]*)?\s*?\n(.*?)^\1\2*\s*?\n/m
# Parse the fenced codeblock at the current location.
def parse_codeblock_fenced
if @src.check(self.class::FENCED_CODEBLOCK_MATCH)
start_line_number = @src.current_line_number