Update character set
This commit is contained in:
parent
19ab22b675
commit
c098a9b024
@ -6,15 +6,15 @@
|
||||
module JekyllTagsExtensions
|
||||
module HighlightCaption
|
||||
def self.prepended(mod)
|
||||
syntax = mod.send(:remove_const, :SYNTAX).source.gsub('\\w', '[^[:^graph:]"]')
|
||||
syntax = mod.send(:remove_const, :SYNTAX).source.gsub('\\w', '[^[:^graph:]"=]')
|
||||
mod.const_set(:SYNTAX, Regexp.new(syntax))
|
||||
options = mod.send(:remove_const, :OPTIONS_REGEX).source.gsub('\\w', '[^[:^graph:]"]')
|
||||
options = mod.send(:remove_const, :OPTIONS_REGEX).source.gsub('\\w', '[^[:^graph:]"=]')
|
||||
mod.const_set(:OPTIONS_REGEX, Regexp.new(options))
|
||||
end
|
||||
|
||||
def render(*args)
|
||||
caption = "<figcaption>"
|
||||
caption << "<span class=\"lang\">#{@lang.upcase}#{@highlight_options[:caption] ? ":" : ""}</span>"
|
||||
caption = "<figcaption><span class=\"lang\">"
|
||||
caption << "#{@lang.upcase}#{@highlight_options[:caption] ? ':' : ''}</span>"
|
||||
if @highlight_options[:caption].is_a? String
|
||||
caption << "<em>#{@highlight_options[:caption]}</em>"
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user