mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-11-01 07:45:01 -04:00
improved lang:language for codeblock and include code. It no longer strips out surrounding whitespace.
This commit is contained in:
parent
2e4f95212a
commit
6db1a5ada5
@ -55,9 +55,9 @@ module Jekyll
|
|||||||
@caption = nil
|
@caption = nil
|
||||||
@filetype = nil
|
@filetype = nil
|
||||||
@highlight = true
|
@highlight = true
|
||||||
if markup =~ /\s+lang:(\w+)/i
|
if markup =~ /\s*lang:(\w+)/i
|
||||||
@filetype = $1
|
@filetype = $1
|
||||||
markup = markup.sub(/\s+lang:\w+\s*/i,'')
|
markup = markup.sub(/lang:\w+/i,'')
|
||||||
end
|
end
|
||||||
if markup =~ CaptionUrlTitle
|
if markup =~ CaptionUrlTitle
|
||||||
@file = $1
|
@file = $1
|
||||||
|
@ -30,9 +30,9 @@ module Jekyll
|
|||||||
def initialize(tag_name, markup, tokens)
|
def initialize(tag_name, markup, tokens)
|
||||||
@title = nil
|
@title = nil
|
||||||
@file = nil
|
@file = nil
|
||||||
if markup.strip =~ /\s+lang:(\w+)/i
|
if markup.strip =~ /\s*lang:(\w+)/i
|
||||||
@filetype = $1
|
@filetype = $1
|
||||||
markup = markup.strip.sub(/\s+lang:\w+\s*/i,'')
|
markup = markup.strip.sub(/lang:\w+/i,'')
|
||||||
end
|
end
|
||||||
if markup.strip =~ /(.*)?(\s+|^)(\/*\S+)/i
|
if markup.strip =~ /(.*)?(\s+|^)(\/*\S+)/i
|
||||||
@title = $1 || nil
|
@title = $1 || nil
|
||||||
|
Loading…
Reference in New Issue
Block a user