From c098a9b02404b4af9277ca91ca82f960c3e8415c Mon Sep 17 00:00:00 2001 From: cryptogopher Date: Sat, 27 May 2023 21:12:39 +0200 Subject: [PATCH] Update character set --- ...ight-capion-options.rb => highlight-caption-option.rb} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename _plugins/{highlight-capion-options.rb => highlight-caption-option.rb} (83%) diff --git a/_plugins/highlight-capion-options.rb b/_plugins/highlight-caption-option.rb similarity index 83% rename from _plugins/highlight-capion-options.rb rename to _plugins/highlight-caption-option.rb index 2e38d8d..d4741af 100644 --- a/_plugins/highlight-capion-options.rb +++ b/_plugins/highlight-caption-option.rb @@ -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 = "
" - caption << "#{@lang.upcase}#{@highlight_options[:caption] ? ":" : ""}" + caption = "
" + caption << "#{@lang.upcase}#{@highlight_options[:caption] ? ':' : ''}" if @highlight_options[:caption].is_a? String caption << "#{@highlight_options[:caption]}" end