From 32a86dc1871c8b13514b93ffff7d9a2300cd5dfb Mon Sep 17 00:00:00 2001 From: Luka Kovacevic Date: Mon, 7 Aug 2023 14:02:03 +0200 Subject: [PATCH] fix: Haml compatibility --- lib/middleman-syntax/haml_monkey_patch.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/middleman-syntax/haml_monkey_patch.rb b/lib/middleman-syntax/haml_monkey_patch.rb index 91e9497..826d8b1 100644 --- a/lib/middleman-syntax/haml_monkey_patch.rb +++ b/lib/middleman-syntax/haml_monkey_patch.rb @@ -1,9 +1,7 @@ -# If Haml is around, define a :code filter that can be used to more conveniently output highlighted code. -if defined? Haml +if defined? Haml && Gem::Version.new(Haml::VERSION) >= Gem::Version.new("6.0.0.beta.1") module Haml - module Filters - module Code - include Base + class Filters + class Code < Base def render(code) code = code.rstrip