Skip to content

Commit

Permalink
Fix deprecation warning from Liquid v5.6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kwkwan committed Jan 15, 2025
1 parent 960cbe3 commit 7afbbab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/metanorma/plugin/lutaml/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
require "metanorma/plugin/lutaml/liquid/custom_filters"
require "metanorma/plugin/lutaml/liquid/multiply_local_file_system"

::Liquid::Template.register_filter(Metanorma::Plugin::Lutaml::Liquid::CustomFilters)
liquid_klass = if Object.const_defined?("Liquid::Environment")
Object.const_get("Liquid::Environment").default
else
Object.const_get("Liquid::Template")
end
liquid_klass.register_filter(Metanorma::Plugin::Lutaml::Liquid::CustomFilters)

module Metanorma
module Plugin
Expand Down

0 comments on commit 7afbbab

Please sign in to comment.