aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2012-12-26 17:33:48 -0600
committerBrandon Mathis <brandon@imathis.com>2012-12-26 17:33:48 -0600
commit55fa9b3d8e82e5e2699e4d30a77a71bac26ba443 (patch)
tree347431b18d1c4e0f6a409475ef39ed10feaac0e3 /plugins
parentc18de558759dff2c77e6e0fc3ce2ad7a9f3fea99 (diff)
downloadmy_new_personal_website-55fa9b3d8e82e5e2699e4d30a77a71bac26ba443.tar.xz
my_new_personal_website-55fa9b3d8e82e5e2699e4d30a77a71bac26ba443.zip
Removed unnecessary regex in code block plugin
Diffstat (limited to '')
-rw-r--r--plugins/code_block.rb6
1 files changed, 1 insertions, 5 deletions
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 = "<figcaption><span>#{$1}</span><a href='#{$2}'>#{$3}</a></figcaption>"
- elsif markup =~ CaptionUrl
- @file = $1
- @caption = "<figcaption><span>#{$1}</span><a href='#{$2}'>link</a></figcaption>"
+ @caption = "<figcaption><span>#{$1}</span><a href='#{$2}'>#{$3 || 'link'}</a></figcaption>"
elsif markup =~ Caption
@file = $1
@caption = "<figcaption><span>#{$1}</span></figcaption>\n"