mirror of
https://github.com/wahyd4/wahyd4.github.com.git
synced 2026-08-09 05:15:56 +10:00
Removed unnecessary regex in code block plugin
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user