Skip to content

Commit

Permalink
fix: Haml compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
lkovace18 committed Aug 7, 2023
1 parent d1b3edd commit 32a86dc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/middleman-syntax/haml_monkey_patch.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 32a86dc

Please sign in to comment.