Skip to content

Commit

Permalink
include -> extend
Browse files Browse the repository at this point in the history
  • Loading branch information
markets committed Jan 17, 2024
1 parent a836cfe commit a047fa6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/middleman-syntax/haml_monkey_patch.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# If Haml is around, define a :code filter that can be used to more conveniently output highlighted code.

if defined? Haml
module HamlMonkeyPatch
def render(code)
Expand All @@ -16,19 +17,20 @@ def render(code)
end
end

if Gem::Version.new(Haml::VERSION) >= Gem::Version.new("6.0.0.beta.1")
if Gem::Version.new(Haml::VERSION) >= Gem::Version.new("6.0.0")
module Haml
class Filters
class Code < Base
include HamlMonkeyPatch
extend HamlMonkeyPatch
end
end
end
else
module Haml
module Filters
module Code
include Base, HamlMonkeyPatch
include Base
extend HamlMonkeyPatch
end
end
end
Expand Down

0 comments on commit a047fa6

Please sign in to comment.