lib/yard/templates/helpers/html_helper.rb in yard-0.5.6 vs lib/yard/templates/helpers/html_helper.rb in yard-0.5.7

- old
+ new

@@ -331,10 +331,10 @@ def html_syntax_highlight(source, type = :ruby) return "" unless source return h(source) if options[:no_highlight] # handle !!!LANG prefix to send to html_syntax_highlight_LANG - if source =~ /\A[ \t]*!!!([\w.+-]+)[ \t]*\r?\n/ + if source =~ /\A(?:[ \t]*\r?\n)?[ \t]*!!!([\w.+-]+)[ \t]*\r?\n/ type, source = $1, $' source = $' end meth = "html_syntax_highlight_#{type}"