aboutsummaryrefslogtreecommitdiff
path: root/plugins/include_code.rb
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2013-04-09 09:17:46 -0500
committerBrandon Mathis <brandon@imathis.com>2013-04-09 09:17:46 -0500
commit3ab22cb8209687f9a77b22c896e16c23a00f3845 (patch)
treecb5f8a9018506878ae1f194812f457107c3ae359 /plugins/include_code.rb
parent7dfba9a26e21b970f74aa663a86d407ae8fd5958 (diff)
downloadmy_new_personal_website-3ab22cb8209687f9a77b22c896e16c23a00f3845.tar.xz
my_new_personal_website-3ab22cb8209687f9a77b22c896e16c23a00f3845.zip
Allowing dashes in code names. Closes #1166
Diffstat (limited to 'plugins/include_code.rb')
-rw-r--r--plugins/include_code.rb4
1 files changed, 2 insertions, 2 deletions
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