From 55fa9b3d8e82e5e2699e4d30a77a71bac26ba443 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Wed, 26 Dec 2012 17:33:48 -0600 Subject: Removed unnecessary regex in code block plugin --- plugins/code_block.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'plugins/code_block.rb') diff --git a/plugins/code_block.rb b/plugins/code_block.rb index 62c551a4..660f73d7 100644 --- a/plugins/code_block.rb +++ b/plugins/code_block.rb @@ -50,7 +50,6 @@ module Jekyll include HighlightCode include TemplateWrapper CaptionUrlTitle = /(\S[\S\s]*)\s+(https?:\/\/\S+|\/\S+)\s*(.+)?/i - CaptionUrl = /(\S[\S\s]*)\s+(https?:\/\/\S+|\/\S+)/i Caption = /(\S[\S\s]*)/ def initialize(tag_name, markup, tokens) @title = nil @@ -63,10 +62,7 @@ module Jekyll end if markup =~ CaptionUrlTitle @file = $1 - @caption = "
#{$1}#{$3}
" - elsif markup =~ CaptionUrl - @file = $1 - @caption = "
#{$1}link
" + @caption = "
#{$1}#{$3 || 'link'}
" elsif markup =~ Caption @file = $1 @caption = "
#{$1}
\n" -- cgit v1.2.1