diff --git a/jekyll-gfm-admonitions.gemspec b/jekyll-gfm-admonitions.gemspec index 6912963..1745768 100644 --- a/jekyll-gfm-admonitions.gemspec +++ b/jekyll-gfm-admonitions.gemspec @@ -4,7 +4,7 @@ Gem::Specification.new do |spec| spec.name = 'jekyll-gfm-admonitions' - spec.version = '1.0.3' + spec.version = '1.0.4' spec.authors = ['Robin De Schepper'] spec.email = ['robin.deschepper93@gmail.com'] diff --git a/lib/jekyll-gfm-admonitions.rb b/lib/jekyll-gfm-admonitions.rb index af56c01..499338f 100644 --- a/lib/jekyll-gfm-admonitions.rb +++ b/lib/jekyll-gfm-admonitions.rb @@ -118,7 +118,8 @@ def admonition_html(type, title, text, icon) css = File.read(File.expand_path('../assets/admonitions.css', __dir__)) page.output.gsub!(%r{(.*?)}m) do |match| - "#{match[0..-7]}#{match[-7..]}" + head = Regexp.last_match(1) + "#{head}" end # If no tag is found, insert the CSS at the start of the output