summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2023-04-08 23:41:30 -0600
committerGitHub <noreply@github.com>2023-04-08 23:41:30 -0600
commit2fd7523bd7631a3f5d343f50c44b108e11b81eb5 (patch)
treebd73b11ac3d1ab013866a9019c80d59aa2545ec9 /lib
parent53ba4196aa7e7a1ede061e0c289067c8ec295c5f (diff)
resolves #4429 add support for Haml 6 to template converter (PR #4431)
Diffstat (limited to 'lib')
-rw-r--r--lib/asciidoctor/converter/template.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/asciidoctor/converter/template.rb b/lib/asciidoctor/converter/template.rb
index 5b27155f..4ed18c58 100644
--- a/lib/asciidoctor/converter/template.rb
+++ b/lib/asciidoctor/converter/template.rb
@@ -30,7 +30,7 @@ class Converter::TemplateConverter < Converter::Base
erb: { trim: 0 },
# TODO line 466 of haml/compiler.rb sorts the attributes; file an issue to make this configurable
# NOTE AsciiDoc syntax expects HTML/XML output to use double quotes around attribute values
- haml: { format: :xhtml, attr_wrapper: '"', escape_attrs: false, ugly: true },
+ haml: { format: :xhtml, attr_wrapper: '"', escape_html: false, escape_attrs: false, ugly: true },
slim: { disable_escape: true, sort_attrs: false, pretty: false },
}
@@ -228,6 +228,7 @@ class Converter::TemplateConverter < Converter::Base
Helpers.require_library 'haml' unless defined? ::Haml::Engine
# NOTE Haml 5 dropped support for pretty printing
@engine_options[extsym].delete :ugly if defined? ::Haml::TempleEngine
+ @engine_options[extsym][:attr_quote] = @engine_options[extsym].delete :attr_wrapper unless defined? ::Haml::Options
@active_engines[extsym] = true
end
when :erb