diff --git a/lib/mdless/converter.rb b/lib/mdless/converter.rb index d1e91d3..e54e454 100644 --- a/lib/mdless/converter.rb +++ b/lib/mdless/converter.rb @@ -634,7 +634,7 @@ def convert_markdown(input) else first_line = m[3].to_s.split(/\n/)[0] - if first_line =~ /^\s*#!/ + if first_line =~ /^\s*#!.*\/.+/ shebang = first_line.match(/^\s*#!.*\/(?:env )?([^\/]+)$/) language = shebang[1] code_block = m[3] diff --git a/test/codeblocks.md b/test/codeblocks.md index aa65bea..b466a24 100644 --- a/test/codeblocks.md +++ b/test/codeblocks.md @@ -4,6 +4,10 @@ date: yesterday Code block tests ================ +``` +#! +``` + Just some text before we get started. ![Image test](https://raw.githubusercontent.com/eddieantonio/i/master/imgcat.png)
after a break