aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/code_block.rb4
-rw-r--r--plugins/include_code.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/code_block.rb b/plugins/code_block.rb
index 660f73d7..f2ae3e55 100644
--- a/plugins/code_block.rb
+++ b/plugins/code_block.rb
@@ -56,9 +56,9 @@ module Jekyll
@caption = nil
@filetype = nil
@highlight = true
- if markup =~ /\s*lang:(\w+)/i
+ if markup =~ /\s*lang:([\w-]+)/i
@filetype = $1
- markup = markup.sub(/lang:\w+/i,'')
+ markup = markup.sub(/\s*lang:([\w-]+)/i,'')
end
if markup =~ CaptionUrlTitle
@file = $1
diff --git a/plugins/include_code.rb b/plugins/include_code.rb
index fc6daa36..1ee3223f 100644
--- a/plugins/include_code.rb
+++ b/plugins/include_code.rb
@@ -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:([\w-]+)/i
@filetype = $1
- markup = markup.strip.sub(/lang:\w+/i,'')
+ markup = markup.strip.sub(/\s*lang:([\w-]+)/i,'')
end
if markup.strip =~ /(.*)?(\s+|^)(\/*\S+)/i
@title = $1 || nil