From 3ab22cb8209687f9a77b22c896e16c23a00f3845 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Tue, 9 Apr 2013 09:17:46 -0500 Subject: Allowing dashes in code names. Closes #1166 --- plugins/include_code.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/include_code.rb') 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 -- cgit v1.2.1