From aa4c397410312ab3c3ee6191110f5e595e5eea00 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 19 Apr 2017 02:59:06 +0900 Subject: [PATCH] Fix spec in #867 for pretty mode removal --- lib/haml/helpers/action_view_mods.rb | 2 +- test/results/bemit.xhtml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/haml/helpers/action_view_mods.rb b/lib/haml/helpers/action_view_mods.rb index 0330c505..44c51f09 100644 --- a/lib/haml/helpers/action_view_mods.rb +++ b/lib/haml/helpers/action_view_mods.rb @@ -54,7 +54,7 @@ module ActionView def content_tag_with_haml(name, *args, &block) return content_tag_without_haml(name, *args, &block) unless is_haml? - preserve = haml_buffer.options.fetch(:preserve, %w[textarea pre code]).include?(name.to_s) + preserve = haml_buffer.options.fetch(:preserve, []).include?(name.to_s) if block_given? && block_is_haml?(block) && preserve return content_tag_without_haml(name, *args) {preserve(&block)} diff --git a/test/results/bemit.xhtml b/test/results/bemit.xhtml index 30db0b01..b9ff8c4a 100644 --- a/test/results/bemit.xhtml +++ b/test/results/bemit.xhtml @@ -1,4 +1,4 @@
- -

...

-
\ No newline at end of file + +

...

+