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