mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-11-15 13:45:00 -05:00
Accepting all non-whitespace characters as language names for Pygments code highlighting
This commit is contained in:
parent
3ab22cb820
commit
afca876bd4
@ -56,9 +56,9 @@ module Jekyll
|
||||
@caption = nil
|
||||
@filetype = nil
|
||||
@highlight = true
|
||||
if markup =~ /\s*lang:([\w-]+)/i
|
||||
if markup =~ /\s*lang:(\S+)/i
|
||||
@filetype = $1
|
||||
markup = markup.sub(/\s*lang:([\w-]+)/i,'')
|
||||
markup = markup.sub(/\s*lang:(\S+)/i,'')
|
||||
end
|
||||
if markup =~ CaptionUrlTitle
|
||||
@file = $1
|
||||
|
@ -32,9 +32,9 @@ module Jekyll
|
||||
def initialize(tag_name, markup, tokens)
|
||||
@title = nil
|
||||
@file = nil
|
||||
if markup.strip =~ /\s*lang:([\w-]+)/i
|
||||
if markup.strip =~ /\s*lang:(\S+)/i
|
||||
@filetype = $1
|
||||
markup = markup.strip.sub(/\s*lang:([\w-]+)/i,'')
|
||||
markup = markup.strip.sub(/lang:\S+/i,'')
|
||||
end
|
||||
if markup.strip =~ /(.*)?(\s+|^)(\/*\S+)/i
|
||||
@title = $1 || nil
|
||||
|
Loading…
Reference in New Issue
Block a user