mirror of
https://github.com/WatchOutNewsAgency/wona.github.com.git
synced 2026-01-01 01:16:26 +00:00
Codeblock regex improved to better detect extensions fixes #96, added support for tableizing non highlighted code blocks from liquid codeblock tag and backtick code blocks
This commit is contained in:
@ -64,7 +64,7 @@ module Jekyll
|
||||
@file = $1
|
||||
@caption = "<figcaption><span>#{$1}</span></figcaption>\n"
|
||||
end
|
||||
if @file =~ /\S[\S\s]*\.(\w+)/
|
||||
if @file =~ /\S[\S\s]*\w+\.(\w+)/
|
||||
@filetype = $1
|
||||
end
|
||||
super
|
||||
@ -82,7 +82,7 @@ module Jekyll
|
||||
@filetype = 'yaml' if @filetype == 'yml'
|
||||
source += " #{highlight(code, @filetype)}</figure></div>"
|
||||
else
|
||||
source += "<pre><code>" + code.lstrip.rstrip.gsub(/</,'<') + "</code></pre></figure></div>"
|
||||
source += "#{tableize_code(code.lstrip.rstrip.gsub(/</,'<'))}</figure></div>"
|
||||
end
|
||||
source = source + context['pygments_suffix'] if context['pygments_suffix']
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user