Allowing dashes in code names. Closes #1166
This commit is contained in:
parent
7dfba9a26e
commit
3ab22cb820
@ -56,9 +56,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(/lang:\w+/i,'')
|
markup = markup.sub(/\s*lang:([\w-]+)/i,'')
|
||||||
end
|
end
|
||||||
if markup =~ CaptionUrlTitle
|
if markup =~ CaptionUrlTitle
|
||||||
@file = $1
|
@file = $1
|
||||||
|
@ -32,9 +32,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(/lang:\w+/i,'')
|
markup = markup.strip.sub(/\s*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