From 62da62d613d8db72c3b0a7b827851211b420842f Mon Sep 17 00:00:00 2001 From: Joel Hawksley Date: Tue, 31 Mar 2026 08:39:58 -0700 Subject: [PATCH 1/7] Preserve line count for multi-line code blocks Multi-line `<% ... %>` code blocks where `<%` and `%>` are on their own lines lose line count parity with Erubi. The `.strip` call on `node.content.value` removes the leading/trailing newlines that represent the `<%` and `%>` delimiter lines. Erubi processes templates line-by-line and naturally emits blank lines for standalone `<%` and `%>` delimiters. Herb processes the entire ERBContentNode as one chunk. Fix: Detect when raw content starts/ends with newlines (indicating standalone delimiters) and preserve them in the emitted code. Also adjust `apply_trim` to use `right_space = "\n"` when code already ends with a newline, avoiding double-newline emission. --- lib/herb/engine/compiler.rb | 13 +++++++++++-- test/engine/whitespace_trimming_test.rb | 12 ++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/lib/herb/engine/compiler.rb b/lib/herb/engine/compiler.rb index f662a9959..044a54f80 100644 --- a/lib/herb/engine/compiler.rb +++ b/lib/herb/engine/compiler.rb @@ -350,11 +350,14 @@ def process_erb_tag(node, skip_comment_check: false) end return if erb_graphql?(opening) - code = node.content.value.strip + raw_content = node.content.value + code = raw_content.strip if erb_output?(opening) process_erb_output(node, opening, code) else + code = "\n#{code}" if raw_content.start_with?("\n") + code = "#{code}\n" if raw_content.match?(/\n[ \t]*\z/) apply_trim(node, code) end end @@ -590,7 +593,13 @@ def apply_trim(node, code) if at_line_start? leading_space = extract_and_remove_leading_space! effective_leading_space = leading_space.empty? ? removed_whitespace : leading_space - right_space = Herb::Engine.heredoc?(code) ? "\n" : " \n" + right_space = if code.end_with?("\n") + "\n" + elsif Herb::Engine.heredoc?(code) + "\n" + else + " \n" + end @pending_leading_whitespace_insert_index = @tokens.length @pending_leading_whitespace = effective_leading_space if !effective_leading_space.empty? && follows_newline diff --git a/test/engine/whitespace_trimming_test.rb b/test/engine/whitespace_trimming_test.rb index c31f1501e..c908e9c36 100644 --- a/test/engine/whitespace_trimming_test.rb +++ b/test/engine/whitespace_trimming_test.rb @@ -364,5 +364,17 @@ class WhitespaceTrimmingTest < Minitest::Spec assert_compiled_snapshot(template) assert_evaluated_snapshot(template, enforce_erubi_equality: true) end + + test "multi-line code block preserves line count parity with erubi" do + template = "<%\n x = 1\n y = 2\n%>\n<%= x %>" + + herb_engine = assert_compiled_snapshot(template) + erubi_engine = Erubi::Engine.new(template) + + assert_equal erubi_engine.src.lines.count, herb_engine.src.lines.count, + "Herb should preserve line count for multi-line code blocks.\n" \ + " Erubi (#{erubi_engine.src.lines.count} lines): #{erubi_engine.src.inspect}\n" \ + " Herb (#{herb_engine.src.lines.count} lines): #{herb_engine.src.inspect}" + end end end From 35ad624eb8cd51cf7b528c7074703fb24c17a734 Mon Sep 17 00:00:00 2001 From: Joel Hawksley Date: Tue, 31 Mar 2026 09:59:32 -0600 Subject: [PATCH 2/7] Fix RuboCop offenses: duplicate branch and argument alignment --- lib/herb/engine/compiler.rb | 4 +--- test/engine/whitespace_trimming_test.rb | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/herb/engine/compiler.rb b/lib/herb/engine/compiler.rb index 044a54f80..67c602aad 100644 --- a/lib/herb/engine/compiler.rb +++ b/lib/herb/engine/compiler.rb @@ -593,9 +593,7 @@ def apply_trim(node, code) if at_line_start? leading_space = extract_and_remove_leading_space! effective_leading_space = leading_space.empty? ? removed_whitespace : leading_space - right_space = if code.end_with?("\n") - "\n" - elsif Herb::Engine.heredoc?(code) + right_space = if code.end_with?("\n") || Herb::Engine.heredoc?(code) "\n" else " \n" diff --git a/test/engine/whitespace_trimming_test.rb b/test/engine/whitespace_trimming_test.rb index c908e9c36..efaa51974 100644 --- a/test/engine/whitespace_trimming_test.rb +++ b/test/engine/whitespace_trimming_test.rb @@ -372,9 +372,9 @@ class WhitespaceTrimmingTest < Minitest::Spec erubi_engine = Erubi::Engine.new(template) assert_equal erubi_engine.src.lines.count, herb_engine.src.lines.count, - "Herb should preserve line count for multi-line code blocks.\n" \ - " Erubi (#{erubi_engine.src.lines.count} lines): #{erubi_engine.src.inspect}\n" \ - " Herb (#{herb_engine.src.lines.count} lines): #{herb_engine.src.inspect}" + "Herb should preserve line count for multi-line code blocks.\n " \ + "Erubi (#{erubi_engine.src.lines.count} lines): #{erubi_engine.src.inspect}\n " \ + "Herb (#{herb_engine.src.lines.count} lines): #{herb_engine.src.inspect}" end end end From 08d534f6800befd8c009007179a2e0e35153e931 Mon Sep 17 00:00:00 2001 From: Joel Hawksley Date: Tue, 31 Mar 2026 10:23:07 -0600 Subject: [PATCH 3/7] Update snapshot for block comment compilation --- ...ock_comment_compilation_d5c98b9f230e001f8aabf838d3774698.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/snapshots/engine/examples_compilation_test/test_0004_block_comment_compilation_d5c98b9f230e001f8aabf838d3774698.txt b/test/snapshots/engine/examples_compilation_test/test_0004_block_comment_compilation_d5c98b9f230e001f8aabf838d3774698.txt index c88d96943..eb96167ff 100644 --- a/test/snapshots/engine/examples_compilation_test/test_0004_block_comment_compilation_d5c98b9f230e001f8aabf838d3774698.txt +++ b/test/snapshots/engine/examples_compilation_test/test_0004_block_comment_compilation_d5c98b9f230e001f8aabf838d3774698.txt @@ -3,10 +3,12 @@ source: "Engine::ExamplesCompilationTest#test_0004_block comment compilation" input: "{source: \"<%\\n=begin %>\\n This, while unusual, is a legal form of commenting.\\n<%\\n=end %>\\n\\n
Content
\\n\", options: {escape: false}}" --- _buf = ::String.new; + =begin _buf << ' This, while unusual, is a legal form of commenting. '.freeze; + =end _buf << ' From a0005065e2e061b29a541424f4774c8a2268e6e8 Mon Sep 17 00:00:00 2001 From: Joel Hawksley Date: Tue, 31 Mar 2026 10:38:06 -0600 Subject: [PATCH 4/7] Regenerate all snapshots --- ...c917b-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 38 +++++++-- ...e1c9e-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 42 +++------- ...c31a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 40 +++------ ...755cd-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 38 ++------- ...3028f-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 82 +++++++------------ ...9432a-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 64 ++++++++++++--- ...97a23-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 38 +++++++-- ...2b1a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 38 +++++++-- ...1ae3d-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...83f9a-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...cc487-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...cc825-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...d71ca-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 3 +- ...0d7b8-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 3 +- ...9c21a-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 16 ++-- ...50a72-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 16 ++-- ...7fe98-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 5 +- ...e3a67-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...261dc-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...995bc-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...d1f1f-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...bafe0-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 3 +- ...e04c5-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 3 +- ...58e23-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 16 ++-- ...914e9-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 5 +- ...7d54f-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 16 ++-- ...0292a-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 16 ++-- ...16ab6-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...3885b-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...50b7c-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...iline_ff404c4e708f59f532b4042441e458ad.txt | 2 + ..._tags_95bcfa3f3e28634bf923f18df0cd38a1.txt | 4 +- ...after_0ee0ba8a9a25359175b884cf66f37b2c.txt | 4 +- ...g_tag_72379778fa34572e48b949a780f761b1.txt | 2 + ..._Ruby_4af6472f81c8026291897a7a34e6ae0b.txt | 4 +- ..._Ruby_61fc267bae73b15dae254d0d5f9fbe0e.txt | 4 +- ..._Ruby_c596f2621d8ae2223c3805e78ff1b3e3.txt | 4 +- ...erubi_056ad410b82f521050ab536ab6d01f5f.txt | 10 +++ ...uotes_e5c77f0eb3bb473c0528739accce89c5.txt | 56 +++++++++---- ...uotes_196933f4d9a4449e3abaf99c44969247.txt | 56 +++++++++---- ...uotes_2ad14321709dc65c50e3a497c1cff9c8.txt | 70 ++++++++++++---- ...uotes_f549f420ee65b49739afa842180b356a.txt | 70 ++++++++++++---- 42 files changed, 479 insertions(+), 311 deletions(-) create mode 100644 test/snapshots/engine/whitespace_trimming_test/test_0045_multi-line_code_block_preserves_line_count_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0007_image_tag_with_skip_pipeline_51a3ad06b61dd39c5d6cad81140c917b-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0007_image_tag_with_skip_pipeline_51a3ad06b61dd39c5d6cad81140c917b-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 1c8ad0ea7..917afd7ed 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0007_image_tag_with_skip_pipeline_51a3ad06b61dd39c5d6cad81140c917b-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0007_image_tag_with_skip_pipeline_51a3ad06b61dd39c5d6cad81140c917b-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,22 +13,42 @@ options: {action_view_helpers: true} │ │ ├── content: " image_tag "icon.png", skip_pipeline: true " (location: (1:3)-(1:46)) │ │ ├── tag_closing: "%>" (location: (1:46)-(1:48)) │ │ ├── tag_name: "img" (location: (1:4)-(1:13)) - │ │ └── children: (1 item) - │ │ └── @ HTMLAttributeNode (location: (1:14)-(1:24)) + │ │ └── children: (2 items) + │ │ ├── @ HTMLAttributeNode (location: (1:14)-(1:24)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:14)-(1:24)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:14)-(1:24)) + │ │ │ │ └── content: "src" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: ":" (location: (1:14)-(1:24)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:14)-(1:24)) + │ │ │ ├── open_quote: ∅ + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ RubyLiteralNode (location: (1:14)-(1:24)) + │ │ │ │ └── content: "image_path(\"icon.png\")" + │ │ │ │ + │ │ │ ├── close_quote: ∅ + │ │ │ └── quoted: false + │ │ │ + │ │ │ + │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:45)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:14)-(1:24)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:39)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:14)-(1:24)) - │ │ │ └── content: "src" + │ │ │ └── @ LiteralNode (location: (1:26)-(1:39)) + │ │ │ └── content: "skip-pipeline" │ │ │ │ │ │ - │ │ ├── equals: ":" (location: (1:14)-(1:24)) + │ │ ├── equals: ": " (location: (1:39)-(1:41)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:14)-(1:24)) + │ │ └── @ HTMLAttributeValueNode (location: (1:41)-(1:45)) │ │ ├── open_quote: ∅ │ │ ├── children: (1 item) - │ │ │ └── @ RubyLiteralNode (location: (1:14)-(1:24)) - │ │ │ └── content: "image_path(\"icon.png\", skip_pipeline: true)" + │ │ │ └── @ LiteralNode (location: (1:41)-(1:45)) + │ │ │ └── content: "true" │ │ │ │ │ ├── close_quote: ∅ │ │ └── quoted: false diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0008_image_tag_with_static_size_WxH_786dcb30de241afa9011827f52be1c9e-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0008_image_tag_with_static_size_WxH_786dcb30de241afa9011827f52be1c9e-ef4af315cb33925c38d24ea3c2e8a1cd.txt index b19e6ec0c..b07534580 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0008_image_tag_with_static_size_WxH_786dcb30de241afa9011827f52be1c9e-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0008_image_tag_with_static_size_WxH_786dcb30de241afa9011827f52be1c9e-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,7 +13,7 @@ options: {action_view_helpers: true} │ │ ├── content: " image_tag "icon.png", size: "32x32" " (location: (1:3)-(1:40)) │ │ ├── tag_closing: "%>" (location: (1:40)-(1:42)) │ │ ├── tag_name: "img" (location: (1:4)-(1:13)) - │ │ └── children: (3 items) + │ │ └── children: (2 items) │ │ ├── @ HTMLAttributeNode (location: (1:14)-(1:24)) │ │ │ ├── name: │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:14)-(1:24)) @@ -34,43 +34,23 @@ options: {action_view_helpers: true} │ │ │ └── quoted: false │ │ │ │ │ │ - │ │ ├── @ HTMLAttributeNode (location: (1:26)-(1:26)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ │ └── content: "width" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: "=" (location: (1:26)-(1:26)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) - │ │ │ ├── open_quote: """ (location: (1:26)-(1:26)) - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ │ └── content: "32" - │ │ │ │ - │ │ │ ├── close_quote: """ (location: (1:26)-(1:26)) - │ │ │ └── quoted: true - │ │ │ - │ │ │ - │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:26)) + │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:39)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:30)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ └── content: "height" + │ │ │ └── @ LiteralNode (location: (1:26)-(1:30)) + │ │ │ └── content: "size" │ │ │ │ │ │ - │ │ ├── equals: "=" (location: (1:26)-(1:26)) + │ │ ├── equals: ": " (location: (1:30)-(1:32)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) - │ │ ├── open_quote: """ (location: (1:26)-(1:26)) + │ │ └── @ HTMLAttributeValueNode (location: (1:32)-(1:39)) + │ │ ├── open_quote: """ (location: (1:32)-(1:33)) │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ └── content: "32" + │ │ │ └── @ LiteralNode (location: (1:33)-(1:38)) + │ │ │ └── content: "32x32" │ │ │ - │ │ ├── close_quote: """ (location: (1:26)-(1:26)) + │ │ ├── close_quote: """ (location: (1:38)-(1:39)) │ │ └── quoted: true │ │ │ │ diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0009_image_tag_with_static_size_N_b7439b4cd2add9699ab71226110c31a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0009_image_tag_with_static_size_N_b7439b4cd2add9699ab71226110c31a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 8d6f4fc65..521d5fdd3 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0009_image_tag_with_static_size_N_b7439b4cd2add9699ab71226110c31a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0009_image_tag_with_static_size_N_b7439b4cd2add9699ab71226110c31a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,7 +13,7 @@ options: {action_view_helpers: true} │ │ ├── content: " image_tag "icon.png", size: "32" " (location: (1:3)-(1:37)) │ │ ├── tag_closing: "%>" (location: (1:37)-(1:39)) │ │ ├── tag_name: "img" (location: (1:4)-(1:13)) - │ │ └── children: (3 items) + │ │ └── children: (2 items) │ │ ├── @ HTMLAttributeNode (location: (1:14)-(1:24)) │ │ │ ├── name: │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:14)-(1:24)) @@ -34,43 +34,23 @@ options: {action_view_helpers: true} │ │ │ └── quoted: false │ │ │ │ │ │ - │ │ ├── @ HTMLAttributeNode (location: (1:26)-(1:26)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ │ └── content: "width" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: "=" (location: (1:26)-(1:26)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) - │ │ │ ├── open_quote: """ (location: (1:26)-(1:26)) - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ │ └── content: "32" - │ │ │ │ - │ │ │ ├── close_quote: """ (location: (1:26)-(1:26)) - │ │ │ └── quoted: true - │ │ │ - │ │ │ - │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:26)) + │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:36)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:30)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ └── content: "height" + │ │ │ └── @ LiteralNode (location: (1:26)-(1:30)) + │ │ │ └── content: "size" │ │ │ │ │ │ - │ │ ├── equals: "=" (location: (1:26)-(1:26)) + │ │ ├── equals: ": " (location: (1:30)-(1:32)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) - │ │ ├── open_quote: """ (location: (1:26)-(1:26)) + │ │ └── @ HTMLAttributeValueNode (location: (1:32)-(1:36)) + │ │ ├── open_quote: """ (location: (1:32)-(1:33)) │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ └── @ LiteralNode (location: (1:33)-(1:35)) │ │ │ └── content: "32" │ │ │ - │ │ ├── close_quote: """ (location: (1:26)-(1:26)) + │ │ ├── close_quote: """ (location: (1:35)-(1:36)) │ │ └── quoted: true │ │ │ │ diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0010_image_tag_with_dynamic_size_42a8ce9eb0ee2da32c39164a8b1755cd-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0010_image_tag_with_dynamic_size_42a8ce9eb0ee2da32c39164a8b1755cd-ef4af315cb33925c38d24ea3c2e8a1cd.txt index d3bbd5006..dc36f7573 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0010_image_tag_with_dynamic_size_42a8ce9eb0ee2da32c39164a8b1755cd-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0010_image_tag_with_dynamic_size_42a8ce9eb0ee2da32c39164a8b1755cd-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,7 +13,7 @@ options: {action_view_helpers: true} │ │ ├── content: " image_tag "icon.png", size: some_var " (location: (1:3)-(1:41)) │ │ ├── tag_closing: "%>" (location: (1:41)-(1:43)) │ │ ├── tag_name: "img" (location: (1:4)-(1:13)) - │ │ └── children: (3 items) + │ │ └── children: (2 items) │ │ ├── @ HTMLAttributeNode (location: (1:14)-(1:24)) │ │ │ ├── name: │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:14)-(1:24)) @@ -34,41 +34,21 @@ options: {action_view_helpers: true} │ │ │ └── quoted: false │ │ │ │ │ │ - │ │ ├── @ HTMLAttributeNode (location: (1:26)-(1:26)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ │ └── content: "width" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: ":" (location: (1:26)-(1:26)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) - │ │ │ ├── open_quote: ∅ - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ RubyLiteralNode (location: (1:26)-(1:26)) - │ │ │ │ └── content: "some_var.to_s.split(\"x\", 2)[0]" - │ │ │ │ - │ │ │ ├── close_quote: ∅ - │ │ │ └── quoted: false - │ │ │ - │ │ │ - │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:26)) + │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:40)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:30)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ └── content: "height" + │ │ │ └── @ LiteralNode (location: (1:26)-(1:30)) + │ │ │ └── content: "size" │ │ │ │ │ │ - │ │ ├── equals: ":" (location: (1:26)-(1:26)) + │ │ ├── equals: ": " (location: (1:30)-(1:32)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) + │ │ └── @ HTMLAttributeValueNode (location: (1:32)-(1:40)) │ │ ├── open_quote: ∅ │ │ ├── children: (1 item) - │ │ │ └── @ RubyLiteralNode (location: (1:26)-(1:26)) - │ │ │ └── content: "some_var.to_s.split(\"x\", 2)[-1]" + │ │ │ └── @ RubyLiteralNode (location: (1:32)-(1:40)) + │ │ │ └── content: "some_var" │ │ │ │ │ ├── close_quote: ∅ │ │ └── quoted: false diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0011_image_tag_with_size_and_other_attributes_c56689a70a92d3a82ca94b6cd1d3028f-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0011_image_tag_with_size_and_other_attributes_c56689a70a92d3a82ca94b6cd1d3028f-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 965f4192a..c190d7ea1 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0011_image_tag_with_size_and_other_attributes_c56689a70a92d3a82ca94b6cd1d3028f-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0011_image_tag_with_size_and_other_attributes_c56689a70a92d3a82ca94b6cd1d3028f-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,7 +13,7 @@ options: {action_view_helpers: true} │ │ ├── content: " image_tag "icon.png", size: "32x32", alt: "Icon", class: "avatar" " (location: (1:3)-(1:70)) │ │ ├── tag_closing: "%>" (location: (1:70)-(1:72)) │ │ ├── tag_name: "img" (location: (1:4)-(1:13)) - │ │ └── children: (5 items) + │ │ └── children: (4 items) │ │ ├── @ HTMLAttributeNode (location: (1:14)-(1:24)) │ │ │ ├── name: │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:14)-(1:24)) @@ -34,83 +34,63 @@ options: {action_view_helpers: true} │ │ │ └── quoted: false │ │ │ │ │ │ - │ │ ├── @ HTMLAttributeNode (location: (1:41)-(1:52)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:41)-(1:44)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:41)-(1:44)) - │ │ │ │ └── content: "alt" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: ": " (location: (1:44)-(1:46)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:46)-(1:52)) - │ │ │ ├── open_quote: """ (location: (1:46)-(1:47)) - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:47)-(1:51)) - │ │ │ │ └── content: "Icon" - │ │ │ │ - │ │ │ ├── close_quote: """ (location: (1:51)-(1:52)) - │ │ │ └── quoted: true - │ │ │ - │ │ │ - │ │ ├── @ HTMLAttributeNode (location: (1:54)-(1:69)) + │ │ ├── @ HTMLAttributeNode (location: (1:26)-(1:39)) │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:54)-(1:59)) + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:30)) │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:54)-(1:59)) - │ │ │ │ └── content: "class" + │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:30)) + │ │ │ │ └── content: "size" │ │ │ │ │ │ │ │ - │ │ │ ├── equals: ": " (location: (1:59)-(1:61)) + │ │ │ ├── equals: ": " (location: (1:30)-(1:32)) │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:61)-(1:69)) - │ │ │ ├── open_quote: """ (location: (1:61)-(1:62)) + │ │ │ └── @ HTMLAttributeValueNode (location: (1:32)-(1:39)) + │ │ │ ├── open_quote: """ (location: (1:32)-(1:33)) │ │ │ ├── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:62)-(1:68)) - │ │ │ │ └── content: "avatar" + │ │ │ │ └── @ LiteralNode (location: (1:33)-(1:38)) + │ │ │ │ └── content: "32x32" │ │ │ │ - │ │ │ ├── close_quote: """ (location: (1:68)-(1:69)) + │ │ │ ├── close_quote: """ (location: (1:38)-(1:39)) │ │ │ └── quoted: true │ │ │ │ │ │ - │ │ ├── @ HTMLAttributeNode (location: (1:26)-(1:26)) + │ │ ├── @ HTMLAttributeNode (location: (1:41)-(1:52)) │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:41)-(1:44)) │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ │ └── content: "width" + │ │ │ │ └── @ LiteralNode (location: (1:41)-(1:44)) + │ │ │ │ └── content: "alt" │ │ │ │ │ │ │ │ - │ │ │ ├── equals: "=" (location: (1:26)-(1:26)) + │ │ │ ├── equals: ": " (location: (1:44)-(1:46)) │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) - │ │ │ ├── open_quote: """ (location: (1:26)-(1:26)) + │ │ │ └── @ HTMLAttributeValueNode (location: (1:46)-(1:52)) + │ │ │ ├── open_quote: """ (location: (1:46)-(1:47)) │ │ │ ├── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ │ └── content: "32" + │ │ │ │ └── @ LiteralNode (location: (1:47)-(1:51)) + │ │ │ │ └── content: "Icon" │ │ │ │ - │ │ │ ├── close_quote: """ (location: (1:26)-(1:26)) + │ │ │ ├── close_quote: """ (location: (1:51)-(1:52)) │ │ │ └── quoted: true │ │ │ │ │ │ - │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:26)) + │ │ └── @ HTMLAttributeNode (location: (1:54)-(1:69)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:54)-(1:59)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ └── content: "height" + │ │ │ └── @ LiteralNode (location: (1:54)-(1:59)) + │ │ │ └── content: "class" │ │ │ │ │ │ - │ │ ├── equals: "=" (location: (1:26)-(1:26)) + │ │ ├── equals: ": " (location: (1:59)-(1:61)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) - │ │ ├── open_quote: """ (location: (1:26)-(1:26)) + │ │ └── @ HTMLAttributeValueNode (location: (1:61)-(1:69)) + │ │ ├── open_quote: """ (location: (1:61)-(1:62)) │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) - │ │ │ └── content: "32" + │ │ │ └── @ LiteralNode (location: (1:62)-(1:68)) + │ │ │ └── content: "avatar" │ │ │ - │ │ ├── close_quote: """ (location: (1:26)-(1:26)) + │ │ ├── close_quote: """ (location: (1:68)-(1:69)) │ │ └── quoted: true │ │ │ │ diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0009_javascript_include_tag_with_host_and_protocol_fb1385fa4721eab3704d50a0bce9432a-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0009_javascript_include_tag_with_host_and_protocol_fb1385fa4721eab3704d50a0bce9432a-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 789f4b7d3..2e0e76ae1 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0009_javascript_include_tag_with_host_and_protocol_fb1385fa4721eab3704d50a0bce9432a-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0009_javascript_include_tag_with_host_and_protocol_fb1385fa4721eab3704d50a0bce9432a-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,25 +13,65 @@ options: {action_view_helpers: true} │ │ ├── content: " javascript_include_tag "xmlhr", host: "localhost", protocol: "https" " (location: (1:3)-(1:73)) │ │ ├── tag_closing: "%>" (location: (1:73)-(1:75)) │ │ ├── tag_name: "script" (location: (1:4)-(1:26)) - │ │ └── children: (1 item) - │ │ └── @ HTMLAttributeNode (location: (1:27)-(1:34)) + │ │ └── children: (3 items) + │ │ ├── @ HTMLAttributeNode (location: (1:27)-(1:34)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:27)-(1:34)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:27)-(1:34)) + │ │ │ │ └── content: "src" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: ":" (location: (1:27)-(1:34)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:27)-(1:34)) + │ │ │ ├── open_quote: ∅ + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ RubyLiteralNode (location: (1:27)-(1:34)) + │ │ │ │ └── content: "javascript_path(\"xmlhr\")" + │ │ │ │ + │ │ │ ├── close_quote: ∅ + │ │ │ └── quoted: false + │ │ │ + │ │ │ + │ │ ├── @ HTMLAttributeNode (location: (1:36)-(1:53)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:36)-(1:40)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:36)-(1:40)) + │ │ │ │ └── content: "host" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: ": " (location: (1:40)-(1:42)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:42)-(1:53)) + │ │ │ ├── open_quote: """ (location: (1:42)-(1:43)) + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:43)-(1:52)) + │ │ │ │ └── content: "localhost" + │ │ │ │ + │ │ │ ├── close_quote: """ (location: (1:52)-(1:53)) + │ │ │ └── quoted: true + │ │ │ + │ │ │ + │ │ └── @ HTMLAttributeNode (location: (1:55)-(1:72)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:27)-(1:34)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:55)-(1:63)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:27)-(1:34)) - │ │ │ └── content: "src" + │ │ │ └── @ LiteralNode (location: (1:55)-(1:63)) + │ │ │ └── content: "protocol" │ │ │ │ │ │ - │ │ ├── equals: ":" (location: (1:27)-(1:34)) + │ │ ├── equals: ": " (location: (1:63)-(1:65)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:27)-(1:34)) - │ │ ├── open_quote: ∅ + │ │ └── @ HTMLAttributeValueNode (location: (1:65)-(1:72)) + │ │ ├── open_quote: """ (location: (1:65)-(1:66)) │ │ ├── children: (1 item) - │ │ │ └── @ RubyLiteralNode (location: (1:27)-(1:34)) - │ │ │ └── content: "javascript_path(\"xmlhr\", host: \"localhost\", protocol: \"https\")" + │ │ │ └── @ LiteralNode (location: (1:66)-(1:71)) + │ │ │ └── content: "https" │ │ │ - │ │ ├── close_quote: ∅ - │ │ └── quoted: false + │ │ ├── close_quote: """ (location: (1:71)-(1:72)) + │ │ └── quoted: true │ │ │ │ │ │ diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0014_javascript_include_tag_with_extname_false_4b2b3e63490f91e30f0cb8ab0a897a23-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0014_javascript_include_tag_with_extname_false_4b2b3e63490f91e30f0cb8ab0a897a23-ef4af315cb33925c38d24ea3c2e8a1cd.txt index fc7c8efd5..87ae7b3cc 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0014_javascript_include_tag_with_extname_false_4b2b3e63490f91e30f0cb8ab0a897a23-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0014_javascript_include_tag_with_extname_false_4b2b3e63490f91e30f0cb8ab0a897a23-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,22 +13,42 @@ options: {action_view_helpers: true} │ │ ├── content: " javascript_include_tag "template.jst", extname: false " (location: (1:3)-(1:58)) │ │ ├── tag_closing: "%>" (location: (1:58)-(1:60)) │ │ ├── tag_name: "script" (location: (1:4)-(1:26)) - │ │ └── children: (1 item) - │ │ └── @ HTMLAttributeNode (location: (1:27)-(1:41)) + │ │ └── children: (2 items) + │ │ ├── @ HTMLAttributeNode (location: (1:27)-(1:41)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:27)-(1:41)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:27)-(1:41)) + │ │ │ │ └── content: "src" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: ":" (location: (1:27)-(1:41)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:27)-(1:41)) + │ │ │ ├── open_quote: ∅ + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ RubyLiteralNode (location: (1:27)-(1:41)) + │ │ │ │ └── content: "javascript_path(\"template.jst\")" + │ │ │ │ + │ │ │ ├── close_quote: ∅ + │ │ │ └── quoted: false + │ │ │ + │ │ │ + │ │ └── @ HTMLAttributeNode (location: (1:43)-(1:57)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:27)-(1:41)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:43)-(1:50)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:27)-(1:41)) - │ │ │ └── content: "src" + │ │ │ └── @ LiteralNode (location: (1:43)-(1:50)) + │ │ │ └── content: "extname" │ │ │ │ │ │ - │ │ ├── equals: ":" (location: (1:27)-(1:41)) + │ │ ├── equals: ": " (location: (1:50)-(1:52)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:27)-(1:41)) + │ │ └── @ HTMLAttributeValueNode (location: (1:52)-(1:57)) │ │ ├── open_quote: ∅ │ │ ├── children: (1 item) - │ │ │ └── @ RubyLiteralNode (location: (1:27)-(1:41)) - │ │ │ └── content: "javascript_path(\"template.jst\", extname: false)" + │ │ │ └── @ LiteralNode (location: (1:52)-(1:57)) + │ │ │ └── content: "false" │ │ │ │ │ ├── close_quote: ∅ │ │ └── quoted: false diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0020_javascript_include_tag_with_skip_pipeline_543363d10e02fc9222ffe0746a52b1a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0020_javascript_include_tag_with_skip_pipeline_543363d10e02fc9222ffe0746a52b1a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 0654e53fd..e5c4cba78 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0020_javascript_include_tag_with_skip_pipeline_543363d10e02fc9222ffe0746a52b1a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0020_javascript_include_tag_with_skip_pipeline_543363d10e02fc9222ffe0746a52b1a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,22 +13,42 @@ options: {action_view_helpers: true} │ │ ├── content: " javascript_include_tag "application", skip_pipeline: true " (location: (1:3)-(1:62)) │ │ ├── tag_closing: "%>" (location: (1:62)-(1:64)) │ │ ├── tag_name: "script" (location: (1:4)-(1:26)) - │ │ └── children: (1 item) - │ │ └── @ HTMLAttributeNode (location: (1:27)-(1:40)) + │ │ └── children: (2 items) + │ │ ├── @ HTMLAttributeNode (location: (1:27)-(1:40)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:27)-(1:40)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:27)-(1:40)) + │ │ │ │ └── content: "src" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: ":" (location: (1:27)-(1:40)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:27)-(1:40)) + │ │ │ ├── open_quote: ∅ + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ RubyLiteralNode (location: (1:27)-(1:40)) + │ │ │ │ └── content: "javascript_path(\"application\")" + │ │ │ │ + │ │ │ ├── close_quote: ∅ + │ │ │ └── quoted: false + │ │ │ + │ │ │ + │ │ └── @ HTMLAttributeNode (location: (1:42)-(1:61)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:27)-(1:40)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:42)-(1:55)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:27)-(1:40)) - │ │ │ └── content: "src" + │ │ │ └── @ LiteralNode (location: (1:42)-(1:55)) + │ │ │ └── content: "skip-pipeline" │ │ │ │ │ │ - │ │ ├── equals: ":" (location: (1:27)-(1:40)) + │ │ ├── equals: ": " (location: (1:55)-(1:57)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:27)-(1:40)) + │ │ └── @ HTMLAttributeValueNode (location: (1:57)-(1:61)) │ │ ├── open_quote: ∅ │ │ ├── children: (1 item) - │ │ │ └── @ RubyLiteralNode (location: (1:27)-(1:40)) - │ │ │ └── content: "javascript_path(\"application\", skip_pipeline: true)" + │ │ │ └── @ LiteralNode (location: (1:57)-(1:61)) + │ │ │ └── content: "true" │ │ │ │ │ ├── close_quote: ∅ │ │ └── quoted: false diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0013_content_tag_with_attributes_splat_4d156cb87fff23ce3c0bd404a3f1ae3d-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0013_content_tag_with_attributes_splat_4d156cb87fff23ce3c0bd404a3f1ae3d-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 9f2eb6ec4..d63818c24 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0013_content_tag_with_attributes_splat_4d156cb87fff23ce3c0bd404a3f1ae3d-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0013_content_tag_with_attributes_splat_4d156cb87fff23ce3c0bd404a3f1ae3d-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:40)-(1:40)) - │ │ ├── content: "tag.attributes(**attributes)" + │ │ ├── content: "**attributes" │ │ └── prefix: "" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0018_content_tag_with_splat_in_data_hash_0bf3419e05fbe8af1e2214255fb83f9a-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0018_content_tag_with_splat_in_data_hash_0bf3419e05fbe8af1e2214255fb83f9a-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 20200214c..0a29c5fbc 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0018_content_tag_with_splat_in_data_hash_0bf3419e05fbe8af1e2214255fb83f9a-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0018_content_tag_with_splat_in_data_hash_0bf3419e05fbe8af1e2214255fb83f9a-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:53)-(1:53)) - │ │ ├── content: "tag.attributes(data: data_attrs)" + │ │ ├── content: "**data_attrs" │ │ └── prefix: "data" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0019_content_tag_with_splat_in_aria_hash_6b42b42febf3fb7fa00731c566acc487-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0019_content_tag_with_splat_in_aria_hash_6b42b42febf3fb7fa00731c566acc487-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 9ea114ecd..dbee6b30b 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0019_content_tag_with_splat_in_aria_hash_6b42b42febf3fb7fa00731c566acc487-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0019_content_tag_with_splat_in_aria_hash_6b42b42febf3fb7fa00731c566acc487-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:46)-(1:46)) - │ │ ├── content: "tag.attributes(aria: aria_attrs)" + │ │ ├── content: "**aria_attrs" │ │ └── prefix: "aria" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0020_content_tag_with_only_splat_in_data_hash_b1fe2c7401b59fdecbabb5d503ccc825-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0020_content_tag_with_only_splat_in_data_hash_b1fe2c7401b59fdecbabb5d503ccc825-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 73a9d9d9d..5e2d370d3 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0020_content_tag_with_only_splat_in_data_hash_b1fe2c7401b59fdecbabb5d503ccc825-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0020_content_tag_with_only_splat_in_data_hash_b1fe2c7401b59fdecbabb5d503ccc825-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -17,7 +17,7 @@ options: {action_view_helpers: true} │ │ ├── tag_name: "div" (location: (1:4)-(1:15)) │ │ └── children: (1 item) │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:30)-(1:30)) - │ │ ├── content: "tag.attributes(data: data_attrs)" + │ │ ├── content: "**data_attrs" │ │ └── prefix: "data" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0037_content_tag_with_void_element_img_and_content_argument_reports_error_5bdb8a95466d4783db7ad280fd6d71ca-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0037_content_tag_with_void_element_img_and_content_argument_reports_error_5bdb8a95466d4783db7ad280fd6d71ca-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 1c0d48bb5..0886a6a84 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0037_content_tag_with_void_element_img_and_content_argument_reports_error_5bdb8a95466d4783db7ad280fd6d71ca-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0037_content_tag_with_void_element_img_and_content_argument_reports_error_5bdb8a95466d4783db7ad280fd6d71ca-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -11,8 +11,7 @@ options: {action_view_helpers: true} │ │ └── @ VoidElementContentError (location: (1:22)-(1:29)) │ │ ├── message: "Void element `img` cannot have content. `content_tag :img` does not accept a positional argument for content." │ │ ├── tag_name: "img" (location: (1:4)-(1:15)) - │ │ ├── helper_name: "content_tag :img" - │ │ └── content_type: "a positional argument" + │ │ └── helper_name: "content_tag :img" │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:32)) diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0038_content_tag_with_void_element_br_and_content_argument_reports_error_29c54479d2c6354145cc9b90d440d7b8-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0038_content_tag_with_void_element_br_and_content_argument_reports_error_29c54479d2c6354145cc9b90d440d7b8-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 4b45f282d..c5f44b416 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0038_content_tag_with_void_element_br_and_content_argument_reports_error_29c54479d2c6354145cc9b90d440d7b8-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0038_content_tag_with_void_element_br_and_content_argument_reports_error_29c54479d2c6354145cc9b90d440d7b8-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -11,8 +11,7 @@ options: {action_view_helpers: true} │ │ └── @ VoidElementContentError (location: (1:21)-(1:28)) │ │ ├── message: "Void element `br` cannot have content. `content_tag :br` does not accept a positional argument for content." │ │ ├── tag_name: "br" (location: (1:4)-(1:15)) - │ │ ├── helper_name: "content_tag :br" - │ │ └── content_type: "a positional argument" + │ │ └── helper_name: "content_tag :br" │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:31)) diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0041_content_tag_input_with_do...end_block_reports_void_element_content_error_5db23c1fe50e00c4a562ffb47419c21a-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0041_content_tag_input_with_do...end_block_reports_void_element_content_error_5db23c1fe50e00c4a562ffb47419c21a-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 9ef9d2636..2aa498966 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0041_content_tag_input_with_do...end_block_reports_void_element_content_error_5db23c1fe50e00c4a562ffb47419c21a-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0041_content_tag_input_with_do...end_block_reports_void_element_content_error_5db23c1fe50e00c4a562ffb47419c21a-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,13 +9,6 @@ options: {action_view_helpers: true} @ DocumentNode (location: (1:0)-(4:0)) └── children: (2 items) ├── @ HTMLElementNode (location: (1:0)-(3:9)) - │ ├── errors: (1 error) - │ │ └── @ VoidElementContentError (location: (1:0)-(3:9)) - │ │ ├── message: "Void element `input` cannot have content. `content_tag :input` does not accept a block for content." - │ │ ├── tag_name: "input" (location: (1:4)-(1:15)) - │ │ ├── helper_name: "content_tag :input" - │ │ └── content_type: "a block" - │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:28)) │ │ ├── tag_opening: "<%=" (location: (1:0)-(1:3)) @@ -29,8 +22,13 @@ options: {action_view_helpers: true} │ │ └── @ HTMLTextNode (location: (1:28)-(3:0)) │ │ └── content: "\n content\n" │ │ - │ ├── close_tag: ∅ - │ ├── is_void: true + │ ├── close_tag: + │ │ └── @ ERBEndNode (location: (3:0)-(3:9)) + │ │ ├── tag_opening: "<%" (location: (3:0)-(3:2)) + │ │ ├── content: " end " (location: (3:2)-(3:7)) + │ │ └── tag_closing: "%>" (location: (3:7)-(3:9)) + │ │ + │ ├── is_void: false │ └── element_source: "ActionView::Helpers::TagHelper#content_tag" │ └── @ HTMLTextNode (location: (3:9)-(4:0)) diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0042_content_tag_img_with_do...end_block_reports_void_element_content_error_7273bf89d79ff3b4b1e8d1877b550a72-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0042_content_tag_img_with_do...end_block_reports_void_element_content_error_7273bf89d79ff3b4b1e8d1877b550a72-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 2e7f482be..479780028 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0042_content_tag_img_with_do...end_block_reports_void_element_content_error_7273bf89d79ff3b4b1e8d1877b550a72-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0042_content_tag_img_with_do...end_block_reports_void_element_content_error_7273bf89d79ff3b4b1e8d1877b550a72-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,13 +9,6 @@ options: {action_view_helpers: true} @ DocumentNode (location: (1:0)-(4:0)) └── children: (2 items) ├── @ HTMLElementNode (location: (1:0)-(3:9)) - │ ├── errors: (1 error) - │ │ └── @ VoidElementContentError (location: (1:0)-(3:9)) - │ │ ├── message: "Void element `img` cannot have content. `content_tag :img` does not accept a block for content." - │ │ ├── tag_name: "img" (location: (1:4)-(1:15)) - │ │ ├── helper_name: "content_tag :img" - │ │ └── content_type: "a block" - │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:26)) │ │ ├── tag_opening: "<%=" (location: (1:0)-(1:3)) @@ -29,8 +22,13 @@ options: {action_view_helpers: true} │ │ └── @ HTMLTextNode (location: (1:26)-(3:0)) │ │ └── content: "\n content\n" │ │ - │ ├── close_tag: ∅ - │ ├── is_void: true + │ ├── close_tag: + │ │ └── @ ERBEndNode (location: (3:0)-(3:9)) + │ │ ├── tag_opening: "<%" (location: (3:0)-(3:2)) + │ │ ├── content: " end " (location: (3:2)-(3:7)) + │ │ └── tag_closing: "%>" (location: (3:7)-(3:9)) + │ │ + │ ├── is_void: false │ └── element_source: "ActionView::Helpers::TagHelper#content_tag" │ └── @ HTMLTextNode (location: (3:9)-(4:0)) diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0043_content_tag_br_with_inline_block_reports_void_element_content_error_ead021e6a1097f49ec287dad8207fe98-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0043_content_tag_br_with_inline_block_reports_void_element_content_error_ead021e6a1097f49ec287dad8207fe98-ef4af315cb33925c38d24ea3c2e8a1cd.txt index fb9126d3e..1f22b2849 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0043_content_tag_br_with_inline_block_reports_void_element_content_error_ead021e6a1097f49ec287dad8207fe98-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0043_content_tag_br_with_inline_block_reports_void_element_content_error_ead021e6a1097f49ec287dad8207fe98-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,10 +9,9 @@ options: {action_view_helpers: true} ├── @ HTMLElementNode (location: (1:0)-(1:37)) │ ├── errors: (1 error) │ │ └── @ VoidElementContentError (location: (1:0)-(1:37)) - │ │ ├── message: "Void element `br` cannot have content. `content_tag :br` does not accept a block for content." + │ │ ├── message: "Void element `br` cannot have content. `content_tag :br` does not accept a positional argument for content." │ │ ├── tag_name: "br" (location: (1:4)-(1:15)) - │ │ ├── helper_name: "content_tag :br" - │ │ └── content_type: "a block" + │ │ └── helper_name: "content_tag :br" │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:37)) diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0010_tag.div_with_attributes_splat_6c58246ddb30ec682d60d5c7ea1e3a67-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0010_tag.div_with_attributes_splat_6c58246ddb30ec682d60d5c7ea1e3a67-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 65f044a3a..7c3288247 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0010_tag.div_with_attributes_splat_6c58246ddb30ec682d60d5c7ea1e3a67-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0010_tag.div_with_attributes_splat_6c58246ddb30ec682d60d5c7ea1e3a67-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:30)-(1:30)) - │ │ ├── content: "tag.attributes(**attributes)" + │ │ ├── content: "**attributes" │ │ └── prefix: "" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0015_tag.div_with_splat_in_data_hash_08e62cf8b869e6cda3da7a1d22d261dc-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0015_tag.div_with_splat_in_data_hash_08e62cf8b869e6cda3da7a1d22d261dc-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 131bcb9fa..800a4b176 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0015_tag.div_with_splat_in_data_hash_08e62cf8b869e6cda3da7a1d22d261dc-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0015_tag.div_with_splat_in_data_hash_08e62cf8b869e6cda3da7a1d22d261dc-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:43)-(1:43)) - │ │ ├── content: "tag.attributes(data: data_attrs)" + │ │ ├── content: "**data_attrs" │ │ └── prefix: "data" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0016_tag.div_with_splat_in_aria_hash_8ad32c6ed5ae6d94f82ed245eb1995bc-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0016_tag.div_with_splat_in_aria_hash_8ad32c6ed5ae6d94f82ed245eb1995bc-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 64404c372..0671d250e 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0016_tag.div_with_splat_in_aria_hash_8ad32c6ed5ae6d94f82ed245eb1995bc-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0016_tag.div_with_splat_in_aria_hash_8ad32c6ed5ae6d94f82ed245eb1995bc-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:36)-(1:36)) - │ │ ├── content: "tag.attributes(aria: aria_attrs)" + │ │ ├── content: "**aria_attrs" │ │ └── prefix: "aria" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0017_tag.div_with_only_splat_in_data_hash_d110bd06389a4674c477d2fa66dd1f1f-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0017_tag.div_with_only_splat_in_data_hash_d110bd06389a4674c477d2fa66dd1f1f-ef4af315cb33925c38d24ea3c2e8a1cd.txt index b5e6ec5d0..783eb96e9 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0017_tag.div_with_only_splat_in_data_hash_d110bd06389a4674c477d2fa66dd1f1f-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0017_tag.div_with_only_splat_in_data_hash_d110bd06389a4674c477d2fa66dd1f1f-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -17,7 +17,7 @@ options: {action_view_helpers: true} │ │ ├── tag_name: "div" (location: (1:8)-(1:11)) │ │ └── children: (1 item) │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:20)-(1:20)) - │ │ ├── content: "tag.attributes(data: data_attrs)" + │ │ ├── content: "**data_attrs" │ │ └── prefix: "data" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0045_tag.img_with_content_argument_reports_void_element_content_error_084e2a1a8052416f1cead9abb2dbafe0-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0045_tag.img_with_content_argument_reports_void_element_content_error_084e2a1a8052416f1cead9abb2dbafe0-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 8b2926c5b..1e8045a17 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0045_tag.img_with_content_argument_reports_void_element_content_error_084e2a1a8052416f1cead9abb2dbafe0-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0045_tag.img_with_content_argument_reports_void_element_content_error_084e2a1a8052416f1cead9abb2dbafe0-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -11,8 +11,7 @@ options: {action_view_helpers: true} │ │ └── @ VoidElementContentError (location: (1:12)-(1:24)) │ │ ├── message: "Void element `img` cannot have content. `tag.img` does not accept a positional argument for content." │ │ ├── tag_name: "img" (location: (1:8)-(1:11)) - │ │ ├── helper_name: "tag.img" - │ │ └── content_type: "a positional argument" + │ │ └── helper_name: "tag.img" │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:27)) diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0046_tag.img_with_content_argument_and_data_attributes_reports_void_element_content_error_27beafc0540b950e2d663a972bde04c5-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0046_tag.img_with_content_argument_and_data_attributes_reports_void_element_content_error_27beafc0540b950e2d663a972bde04c5-ef4af315cb33925c38d24ea3c2e8a1cd.txt index e1fe33809..5e42bcd50 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0046_tag.img_with_content_argument_and_data_attributes_reports_void_element_content_error_27beafc0540b950e2d663a972bde04c5-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0046_tag.img_with_content_argument_and_data_attributes_reports_void_element_content_error_27beafc0540b950e2d663a972bde04c5-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -11,8 +11,7 @@ options: {action_view_helpers: true} │ │ └── @ VoidElementContentError (location: (1:12)-(1:24)) │ │ ├── message: "Void element `img` cannot have content. `tag.img` does not accept a positional argument for content." │ │ ├── tag_name: "img" (location: (1:8)-(1:11)) - │ │ ├── helper_name: "tag.img" - │ │ └── content_type: "a positional argument" + │ │ └── helper_name: "tag.img" │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:58)) diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0081_tag.img_with_do...end_block_reports_void_element_content_error_9c1a518d614faf52dd2cc6ac7d958e23-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0081_tag.img_with_do...end_block_reports_void_element_content_error_9c1a518d614faf52dd2cc6ac7d958e23-ef4af315cb33925c38d24ea3c2e8a1cd.txt index f15c7be37..ee0ba25ea 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0081_tag.img_with_do...end_block_reports_void_element_content_error_9c1a518d614faf52dd2cc6ac7d958e23-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0081_tag.img_with_do...end_block_reports_void_element_content_error_9c1a518d614faf52dd2cc6ac7d958e23-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,13 +9,6 @@ options: {action_view_helpers: true} @ DocumentNode (location: (1:0)-(4:0)) └── children: (2 items) ├── @ HTMLElementNode (location: (1:0)-(3:9)) - │ ├── errors: (1 error) - │ │ └── @ VoidElementContentError (location: (1:0)-(3:9)) - │ │ ├── message: "Void element `img` cannot have content. `tag.img` does not accept a block for content." - │ │ ├── tag_name: "img" (location: (1:8)-(1:11)) - │ │ ├── helper_name: "tag.img" - │ │ └── content_type: "a block" - │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:30)) │ │ ├── tag_opening: "<%=" (location: (1:0)-(1:3)) @@ -49,8 +42,13 @@ options: {action_view_helpers: true} │ │ └── @ HTMLTextNode (location: (1:30)-(3:0)) │ │ └── content: "\n a\n" │ │ - │ ├── close_tag: ∅ - │ ├── is_void: true + │ ├── close_tag: + │ │ └── @ ERBEndNode (location: (3:0)-(3:9)) + │ │ ├── tag_opening: "<%" (location: (3:0)-(3:2)) + │ │ ├── content: " end " (location: (3:2)-(3:7)) + │ │ └── tag_closing: "%>" (location: (3:7)-(3:9)) + │ │ + │ ├── is_void: false │ └── element_source: "ActionView::Helpers::TagHelper#tag" │ └── @ HTMLTextNode (location: (3:9)-(4:0)) diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0082_tag.br_with_inline_block_reports_void_element_content_error_1785a65494c55b8dfb047b2b59c914e9-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0082_tag.br_with_inline_block_reports_void_element_content_error_1785a65494c55b8dfb047b2b59c914e9-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 7efd51864..11ef5f6a2 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0082_tag.br_with_inline_block_reports_void_element_content_error_1785a65494c55b8dfb047b2b59c914e9-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0082_tag.br_with_inline_block_reports_void_element_content_error_1785a65494c55b8dfb047b2b59c914e9-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,10 +9,9 @@ options: {action_view_helpers: true} ├── @ HTMLElementNode (location: (1:0)-(1:27)) │ ├── errors: (1 error) │ │ └── @ VoidElementContentError (location: (1:0)-(1:27)) - │ │ ├── message: "Void element `br` cannot have content. `tag.br` does not accept a block for content." + │ │ ├── message: "Void element `br` cannot have content. `tag.br` does not accept a positional argument for content." │ │ ├── tag_name: "br" (location: (1:8)-(1:10)) - │ │ ├── helper_name: "tag.br" - │ │ └── content_type: "a block" + │ │ └── helper_name: "tag.br" │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:27)) diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0083_tag.input_with_do...end_block_reports_void_element_content_error_ac6b504f9283bb9b2292fe8b2077d54f-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0083_tag.input_with_do...end_block_reports_void_element_content_error_ac6b504f9283bb9b2292fe8b2077d54f-ef4af315cb33925c38d24ea3c2e8a1cd.txt index bbadc3312..2b9ad8206 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0083_tag.input_with_do...end_block_reports_void_element_content_error_ac6b504f9283bb9b2292fe8b2077d54f-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0083_tag.input_with_do...end_block_reports_void_element_content_error_ac6b504f9283bb9b2292fe8b2077d54f-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,13 +9,6 @@ options: {action_view_helpers: true} @ DocumentNode (location: (1:0)-(4:0)) └── children: (2 items) ├── @ HTMLElementNode (location: (1:0)-(3:9)) - │ ├── errors: (1 error) - │ │ └── @ VoidElementContentError (location: (1:0)-(3:9)) - │ │ ├── message: "Void element `input` cannot have content. `tag.input` does not accept a block for content." - │ │ ├── tag_name: "input" (location: (1:8)-(1:13)) - │ │ ├── helper_name: "tag.input" - │ │ └── content_type: "a block" - │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:19)) │ │ ├── tag_opening: "<%=" (location: (1:0)-(1:3)) @@ -29,8 +22,13 @@ options: {action_view_helpers: true} │ │ └── @ HTMLTextNode (location: (1:19)-(3:0)) │ │ └── content: "\n content\n" │ │ - │ ├── close_tag: ∅ - │ ├── is_void: true + │ ├── close_tag: + │ │ └── @ ERBEndNode (location: (3:0)-(3:9)) + │ │ ├── tag_opening: "<%" (location: (3:0)-(3:2)) + │ │ ├── content: " end " (location: (3:2)-(3:7)) + │ │ └── tag_closing: "%>" (location: (3:7)-(3:9)) + │ │ + │ ├── is_void: false │ └── element_source: "ActionView::Helpers::TagHelper#tag" │ └── @ HTMLTextNode (location: (3:9)-(4:0)) diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0084_tag.hr_with_do...end_block_reports_void_element_content_error_1fde665bf2ae90beaad429e597c0292a-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0084_tag.hr_with_do...end_block_reports_void_element_content_error_1fde665bf2ae90beaad429e597c0292a-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 61a8cd90d..5ff2df3f4 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0084_tag.hr_with_do...end_block_reports_void_element_content_error_1fde665bf2ae90beaad429e597c0292a-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0084_tag.hr_with_do...end_block_reports_void_element_content_error_1fde665bf2ae90beaad429e597c0292a-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,13 +9,6 @@ options: {action_view_helpers: true} @ DocumentNode (location: (1:0)-(4:0)) └── children: (2 items) ├── @ HTMLElementNode (location: (1:0)-(3:9)) - │ ├── errors: (1 error) - │ │ └── @ VoidElementContentError (location: (1:0)-(3:9)) - │ │ ├── message: "Void element `hr` cannot have content. `tag.hr` does not accept a block for content." - │ │ ├── tag_name: "hr" (location: (1:8)-(1:10)) - │ │ ├── helper_name: "tag.hr" - │ │ └── content_type: "a block" - │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:33)) │ │ ├── tag_opening: "<%=" (location: (1:0)-(1:3)) @@ -49,8 +42,13 @@ options: {action_view_helpers: true} │ │ └── @ HTMLTextNode (location: (1:33)-(3:0)) │ │ └── content: "\n content\n" │ │ - │ ├── close_tag: ∅ - │ ├── is_void: true + │ ├── close_tag: + │ │ └── @ ERBEndNode (location: (3:0)-(3:9)) + │ │ ├── tag_opening: "<%" (location: (3:0)-(3:2)) + │ │ ├── content: " end " (location: (3:2)-(3:7)) + │ │ └── tag_closing: "%>" (location: (3:7)-(3:9)) + │ │ + │ ├── is_void: false │ └── element_source: "ActionView::Helpers::TagHelper#tag" │ └── @ HTMLTextNode (location: (3:9)-(4:0)) diff --git a/test/snapshots/analyze/action_view/tag_helper/turbo_frame_tag_test/test_0010_turbo_frame_tag_with_attributes_splat_df5fcd88eeb491a403b626e1ee216ab6-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/turbo_frame_tag_test/test_0010_turbo_frame_tag_with_attributes_splat_df5fcd88eeb491a403b626e1ee216ab6-ef4af315cb33925c38d24ea3c2e8a1cd.txt index a7a4f43e2..3e47cde54 100644 --- a/test/snapshots/analyze/action_view/tag_helper/turbo_frame_tag_test/test_0010_turbo_frame_tag_with_attributes_splat_df5fcd88eeb491a403b626e1ee216ab6-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/turbo_frame_tag_test/test_0010_turbo_frame_tag_with_attributes_splat_df5fcd88eeb491a403b626e1ee216ab6-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:28)-(1:28)) - │ │ ├── content: "tag.attributes(**attributes)" + │ │ ├── content: "**attributes" │ │ └── prefix: "" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0044_link_to_with_inline_block_and_variable_options_52dcd6e5548da50405eeca6035f3885b-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0044_link_to_with_inline_block_and_variable_options_52dcd6e5548da50405eeca6035f3885b-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 3708e6788..9c71fb160 100644 --- a/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0044_link_to_with_inline_block_and_variable_options_52dcd6e5548da50405eeca6035f3885b-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0044_link_to_with_inline_block_and_variable_options_52dcd6e5548da50405eeca6035f3885b-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -35,7 +35,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:22)-(1:22)) - │ │ ├── content: "tag.attributes(**html_opts)" + │ │ ├── content: "html_opts" │ │ └── prefix: "" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0045_link_to_with_inline_block_and_path_helper_with_variable_options_4ef0d7199cab190bc199910810c50b7c-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0045_link_to_with_inline_block_and_path_helper_with_variable_options_4ef0d7199cab190bc199910810c50b7c-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 79f795245..afe90cdd2 100644 --- a/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0045_link_to_with_inline_block_and_path_helper_with_variable_options_4ef0d7199cab190bc199910810c50b7c-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0045_link_to_with_inline_block_and_path_helper_with_variable_options_4ef0d7199cab190bc199910810c50b7c-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -35,7 +35,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:23)-(1:23)) - │ │ ├── content: "tag.attributes(**options)" + │ │ ├── content: "options" │ │ └── prefix: "" │ │ │ │ diff --git a/test/snapshots/engine/block_comments_test/test_0001_ruby_block_comments_with_=begin_and_=end_multiline_ff404c4e708f59f532b4042441e458ad.txt b/test/snapshots/engine/block_comments_test/test_0001_ruby_block_comments_with_=begin_and_=end_multiline_ff404c4e708f59f532b4042441e458ad.txt index 1bde0c723..3a7c2e170 100644 --- a/test/snapshots/engine/block_comments_test/test_0001_ruby_block_comments_with_=begin_and_=end_multiline_ff404c4e708f59f532b4042441e458ad.txt +++ b/test/snapshots/engine/block_comments_test/test_0001_ruby_block_comments_with_=begin_and_=end_multiline_ff404c4e708f59f532b4042441e458ad.txt @@ -3,10 +3,12 @@ source: "Engine::BlockCommentsTest#test_0001_ruby block comments with =begin and input: "{source: \"<%\\n=begin %>\\n This, while unusual, is a legal form of commenting.\\n<%\\n=end %>\\n
Hey there
\\n\", options: {}}" --- _buf = ::String.new; + =begin _buf << ' This, while unusual, is a legal form of commenting. '.freeze; + =end _buf << '
Hey there
diff --git a/test/snapshots/engine/block_comments_test/test_0002_ruby_block_comments_inside_erb_tags_95bcfa3f3e28634bf923f18df0cd38a1.txt b/test/snapshots/engine/block_comments_test/test_0002_ruby_block_comments_inside_erb_tags_95bcfa3f3e28634bf923f18df0cd38a1.txt index 26d9b7e78..b1c8903ae 100644 --- a/test/snapshots/engine/block_comments_test/test_0002_ruby_block_comments_inside_erb_tags_95bcfa3f3e28634bf923f18df0cd38a1.txt +++ b/test/snapshots/engine/block_comments_test/test_0002_ruby_block_comments_inside_erb_tags_95bcfa3f3e28634bf923f18df0cd38a1.txt @@ -3,9 +3,11 @@ source: "Engine::BlockCommentsTest#test_0002_ruby block comments inside erb tags input: "{source: \"<%\\n=begin\\nThis is a comment\\n=end\\n%>\\n

Content

\\n\", options: {}}" --- _buf = ::String.new; + =begin This is a comment -=end +=end + _buf << '

Content

'.freeze; diff --git a/test/snapshots/engine/block_comments_test/test_0003_ruby_block_comments_with_code_before_and_after_0ee0ba8a9a25359175b884cf66f37b2c.txt b/test/snapshots/engine/block_comments_test/test_0003_ruby_block_comments_with_code_before_and_after_0ee0ba8a9a25359175b884cf66f37b2c.txt index a99b44c90..01184dd3f 100644 --- a/test/snapshots/engine/block_comments_test/test_0003_ruby_block_comments_with_code_before_and_after_0ee0ba8a9a25359175b884cf66f37b2c.txt +++ b/test/snapshots/engine/block_comments_test/test_0003_ruby_block_comments_with_code_before_and_after_0ee0ba8a9a25359175b884cf66f37b2c.txt @@ -4,10 +4,12 @@ input: "{source: \"<% x = 1 %>\\n<%\\n=begin\\nMulti-line comment\\nspanning mul --- _buf = ::String.new; x = 1 + =begin Multi-line comment spanning multiple lines -=end +=end + y = 2 _buf << '
'.freeze; _buf << (x + y).to_s; _buf << '
diff --git a/test/snapshots/engine/block_comments_test/test_0007_ruby_block_comments_with_=begin_and_=end_mutliline_and_no_space_before_ERB_closing_tag_72379778fa34572e48b949a780f761b1.txt b/test/snapshots/engine/block_comments_test/test_0007_ruby_block_comments_with_=begin_and_=end_mutliline_and_no_space_before_ERB_closing_tag_72379778fa34572e48b949a780f761b1.txt index adb7e49a9..144f8e6cc 100644 --- a/test/snapshots/engine/block_comments_test/test_0007_ruby_block_comments_with_=begin_and_=end_mutliline_and_no_space_before_ERB_closing_tag_72379778fa34572e48b949a780f761b1.txt +++ b/test/snapshots/engine/block_comments_test/test_0007_ruby_block_comments_with_=begin_and_=end_mutliline_and_no_space_before_ERB_closing_tag_72379778fa34572e48b949a780f761b1.txt @@ -3,10 +3,12 @@ source: "Engine::BlockCommentsTest#test_0007_ruby block comments with =begin and input: "{source: \"<%\\n=begin%>\\n This, while unusual, is a legal form of commenting.\\n<%\\n=end%>\\n
Hey there
\\n\", options: {}}" --- _buf = ::String.new; + =begin _buf << ' This, while unusual, is a legal form of commenting. '.freeze; + =end _buf << '
Hey there
diff --git a/test/snapshots/engine/engine_test/test_0019_heredoc_in_code_tag_compiles_to_valid_Ruby_4af6472f81c8026291897a7a34e6ae0b.txt b/test/snapshots/engine/engine_test/test_0019_heredoc_in_code_tag_compiles_to_valid_Ruby_4af6472f81c8026291897a7a34e6ae0b.txt index 39be3c687..090bd0828 100644 --- a/test/snapshots/engine/engine_test/test_0019_heredoc_in_code_tag_compiles_to_valid_Ruby_4af6472f81c8026291897a7a34e6ae0b.txt +++ b/test/snapshots/engine/engine_test/test_0019_heredoc_in_code_tag_compiles_to_valid_Ruby_4af6472f81c8026291897a7a34e6ae0b.txt @@ -2,7 +2,9 @@ source: "Engine::EngineTest#test_0019_heredoc in code tag compiles to valid Ruby" input: "{source: \"<%\\n text = <<~TEXT\\n Hello, world!\\n TEXT\\n%>\\n\", options: {}}" --- -_buf = ::String.new; text = <<~TEXT +_buf = ::String.new; +text = <<~TEXT Hello, world! TEXT + _buf.to_s diff --git a/test/snapshots/engine/engine_test/test_0021_heredoc_with_dash_syntax_in_code_tag_compiles_to_valid_Ruby_61fc267bae73b15dae254d0d5f9fbe0e.txt b/test/snapshots/engine/engine_test/test_0021_heredoc_with_dash_syntax_in_code_tag_compiles_to_valid_Ruby_61fc267bae73b15dae254d0d5f9fbe0e.txt index 00793dd4b..0405f6037 100644 --- a/test/snapshots/engine/engine_test/test_0021_heredoc_with_dash_syntax_in_code_tag_compiles_to_valid_Ruby_61fc267bae73b15dae254d0d5f9fbe0e.txt +++ b/test/snapshots/engine/engine_test/test_0021_heredoc_with_dash_syntax_in_code_tag_compiles_to_valid_Ruby_61fc267bae73b15dae254d0d5f9fbe0e.txt @@ -2,7 +2,9 @@ source: "Engine::EngineTest#test_0021_heredoc with dash syntax in code tag compiles to valid Ruby" input: "{source: \"<%\\n text = <<-TEXT\\n Hello, world!\\n TEXT\\n%>\\n\", options: {}}" --- -_buf = ::String.new; text = <<-TEXT +_buf = ::String.new; +text = <<-TEXT Hello, world! TEXT + _buf.to_s diff --git a/test/snapshots/engine/engine_test/test_0022_heredoc_with_quoted_identifier_in_code_tag_compiles_to_valid_Ruby_c596f2621d8ae2223c3805e78ff1b3e3.txt b/test/snapshots/engine/engine_test/test_0022_heredoc_with_quoted_identifier_in_code_tag_compiles_to_valid_Ruby_c596f2621d8ae2223c3805e78ff1b3e3.txt index c6c198568..18e779c7e 100644 --- a/test/snapshots/engine/engine_test/test_0022_heredoc_with_quoted_identifier_in_code_tag_compiles_to_valid_Ruby_c596f2621d8ae2223c3805e78ff1b3e3.txt +++ b/test/snapshots/engine/engine_test/test_0022_heredoc_with_quoted_identifier_in_code_tag_compiles_to_valid_Ruby_c596f2621d8ae2223c3805e78ff1b3e3.txt @@ -2,7 +2,9 @@ source: "Engine::EngineTest#test_0022_heredoc with quoted identifier in code tag compiles to valid Ruby" input: "{source: \"<%\\n text = <<~'TEXT'\\n Hello, world!\\n TEXT\\n%>\\n\", options: {}}" --- -_buf = ::String.new; text = <<~'TEXT' +_buf = ::String.new; +text = <<~'TEXT' Hello, world! TEXT + _buf.to_s diff --git a/test/snapshots/engine/whitespace_trimming_test/test_0045_multi-line_code_block_preserves_line_count_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt b/test/snapshots/engine/whitespace_trimming_test/test_0045_multi-line_code_block_preserves_line_count_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt new file mode 100644 index 000000000..3143cbef1 --- /dev/null +++ b/test/snapshots/engine/whitespace_trimming_test/test_0045_multi-line_code_block_preserves_line_count_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt @@ -0,0 +1,10 @@ +--- +source: "Engine::WhitespaceTrimmingTest#test_0045_multi-line code block preserves line count parity with erubi" +input: "{source: \"<%\\n x = 1\\n y = 2\\n%>\\n<%= x %>\", options: {}}" +--- +_buf = ::String.new; +x = 1 + y = 2 + + _buf << (x).to_s; +_buf.to_s diff --git a/test/snapshots/parser/attributes_test/test_0122_attribute_value_with_HTML_content_in_double_quotes_e5c77f0eb3bb473c0528739accce89c5.txt b/test/snapshots/parser/attributes_test/test_0122_attribute_value_with_HTML_content_in_double_quotes_e5c77f0eb3bb473c0528739accce89c5.txt index 738cfbb0b..580da7173 100644 --- a/test/snapshots/parser/attributes_test/test_0122_attribute_value_with_HTML_content_in_double_quotes_e5c77f0eb3bb473c0528739accce89c5.txt +++ b/test/snapshots/parser/attributes_test/test_0122_attribute_value_with_HTML_content_in_double_quotes_e5c77f0eb3bb473c0528739accce89c5.txt @@ -6,35 +6,63 @@ input: "" └── children: (1 item) └── @ HTMLElementNode (location: (1:0)-(1:46)) ├── open_tag: - │ └── @ HTMLOpenTagNode (location: (1:0)-(1:37)) + │ └── @ HTMLOpenTagNode (location: (1:0)-(1:35)) │ ├── tag_opening: "<" (location: (1:0)-(1:1)) │ ├── tag_name: "iframe" (location: (1:1)-(1:7)) - │ ├── tag_closing: ">" (location: (1:36)-(1:37)) - │ ├── children: (1 item) - │ │ └── @ HTMLAttributeNode (location: (1:8)-(1:36)) + │ ├── tag_closing: ">" (location: (1:34)-(1:35)) + │ ├── children: (2 items) + │ │ ├── @ HTMLAttributeNode (location: (1:8)-(1:22)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:8)-(1:14)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:8)-(1:14)) + │ │ │ │ └── content: "srcdoc" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: "=" (location: (1:14)-(1:15)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:15)-(1:22)) + │ │ │ ├── errors: (1 error) + │ │ │ │ └── @ UnclosedQuoteError (location: (1:15)-(1:22)) + │ │ │ │ ├── message: "Attribute value opened with \" at (1:15) was never closed." + │ │ │ │ └── opening_quote: """ (location: (1:15)-(1:16)) + │ │ │ │ + │ │ │ ├── open_quote: """ (location: (1:15)-(1:16)) + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:16)-(1:22)) + │ │ │ │ └── content: "" + │ │ │ └── @ LiteralNode (location: (1:30)-(1:33)) + │ │ │ └── content: "foo" │ │ │ - │ │ ├── close_quote: """ (location: (1:35)-(1:36)) + │ │ ├── close_quote: "'" (location: (1:33)-(1:34)) │ │ └── quoted: true │ │ │ │ │ └── is_void: false │ ├── tag_name: "iframe" (location: (1:1)-(1:7)) - ├── body: [] + ├── body: (1 item) + │ └── @ HTMLTextNode (location: (1:35)-(1:37)) + │ └── content: "\">" + │ ├── close_tag: │ └── @ HTMLCloseTagNode (location: (1:37)-(1:46)) │ ├── tag_opening: "'>" └── children: (1 item) └── @ HTMLElementNode (location: (1:0)-(1:46)) ├── open_tag: - │ └── @ HTMLOpenTagNode (location: (1:0)-(1:37)) + │ └── @ HTMLOpenTagNode (location: (1:0)-(1:35)) │ ├── tag_opening: "<" (location: (1:0)-(1:1)) │ ├── tag_name: "iframe" (location: (1:1)-(1:7)) - │ ├── tag_closing: ">" (location: (1:36)-(1:37)) - │ ├── children: (1 item) - │ │ └── @ HTMLAttributeNode (location: (1:8)-(1:36)) + │ ├── tag_closing: ">" (location: (1:34)-(1:35)) + │ ├── children: (2 items) + │ │ ├── @ HTMLAttributeNode (location: (1:8)-(1:22)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:8)-(1:14)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:8)-(1:14)) + │ │ │ │ └── content: "srcdoc" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: "=" (location: (1:14)-(1:15)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:15)-(1:22)) + │ │ │ ├── errors: (1 error) + │ │ │ │ └── @ UnclosedQuoteError (location: (1:15)-(1:22)) + │ │ │ │ ├── message: "Attribute value opened with ' at (1:15) was never closed." + │ │ │ │ └── opening_quote: "'" (location: (1:15)-(1:16)) + │ │ │ │ + │ │ │ ├── open_quote: "'" (location: (1:15)-(1:16)) + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:16)-(1:22)) + │ │ │ │ └── content: "" + │ │ │ └── @ LiteralNode (location: (1:30)-(1:33)) + │ │ │ └── content: "foo" │ │ │ - │ │ ├── close_quote: "'" (location: (1:35)-(1:36)) + │ │ ├── close_quote: """ (location: (1:33)-(1:34)) │ │ └── quoted: true │ │ │ │ │ └── is_void: false │ ├── tag_name: "iframe" (location: (1:1)-(1:7)) - ├── body: [] + ├── body: (1 item) + │ └── @ HTMLTextNode (location: (1:35)-(1:37)) + │ └── content: "'>" + │ ├── close_tag: │ └── @ HTMLCloseTagNode (location: (1:37)-(1:46)) │ ├── tag_opening: "text\">" └── children: (1 item) └── @ HTMLElementNode (location: (1:0)-(1:59)) ├── open_tag: - │ └── @ HTMLOpenTagNode (location: (1:0)-(1:53)) + │ └── @ HTMLOpenTagNode (location: (1:0)-(1:40)) │ ├── tag_opening: "<" (location: (1:0)-(1:1)) │ ├── tag_name: "div" (location: (1:1)-(1:4)) - │ ├── tag_closing: ">" (location: (1:52)-(1:53)) - │ ├── children: (1 item) - │ │ └── @ HTMLAttributeNode (location: (1:5)-(1:52)) + │ ├── tag_closing: ">" (location: (1:39)-(1:40)) + │ ├── children: (2 items) + │ │ ├── @ HTMLAttributeNode (location: (1:5)-(1:22)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:5)-(1:14)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:5)-(1:14)) + │ │ │ │ └── content: "data-html" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: "=" (location: (1:14)-(1:15)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:15)-(1:22)) + │ │ │ ├── errors: (1 error) + │ │ │ │ └── @ UnclosedQuoteError (location: (1:15)-(1:22)) + │ │ │ │ ├── message: "Attribute value opened with \" at (1:15) was never closed." + │ │ │ │ └── opening_quote: """ (location: (1:15)-(1:16)) + │ │ │ │ + │ │ │ ├── open_quote: """ (location: (1:15)-(1:16)) + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:16)-(1:22)) + │ │ │ │ └── content: "text" + │ │ │ └── @ LiteralNode (location: (1:29)-(1:38)) + │ │ │ └── content: "highlight" │ │ │ - │ │ ├── close_quote: """ (location: (1:51)-(1:52)) + │ │ ├── close_quote: "'" (location: (1:38)-(1:39)) │ │ └── quoted: true │ │ │ │ │ └── is_void: false │ ├── tag_name: "div" (location: (1:1)-(1:4)) - ├── body: [] + ├── body: (3 items) + │ ├── @ HTMLTextNode (location: (1:40)-(1:44)) + │ │ └── content: "text" + │ │ + │ ├── @ HTMLCloseTagNode (location: (1:44)-(1:51)) + │ │ ├── errors: (1 error) + │ │ │ └── @ MissingOpeningTagError (location: (1:44)-(1:51)) + │ │ │ ├── message: "Found closing tag `` at (1:46) without a matching opening tag in the same scope." + │ │ │ └── closing_tag: "span" (location: (1:46)-(1:50)) + │ │ │ + │ │ ├── tag_opening: "" (location: (1:50)-(1:51)) + │ │ + │ └── @ HTMLTextNode (location: (1:51)-(1:53)) + │ └── content: "\">" + │ ├── close_tag: │ └── @ HTMLCloseTagNode (location: (1:53)-(1:59)) │ ├── tag_opening: "text'>" └── children: (1 item) └── @ HTMLElementNode (location: (1:0)-(1:59)) ├── open_tag: - │ └── @ HTMLOpenTagNode (location: (1:0)-(1:53)) + │ └── @ HTMLOpenTagNode (location: (1:0)-(1:40)) │ ├── tag_opening: "<" (location: (1:0)-(1:1)) │ ├── tag_name: "div" (location: (1:1)-(1:4)) - │ ├── tag_closing: ">" (location: (1:52)-(1:53)) - │ ├── children: (1 item) - │ │ └── @ HTMLAttributeNode (location: (1:5)-(1:52)) + │ ├── tag_closing: ">" (location: (1:39)-(1:40)) + │ ├── children: (2 items) + │ │ ├── @ HTMLAttributeNode (location: (1:5)-(1:22)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:5)-(1:14)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:5)-(1:14)) + │ │ │ │ └── content: "data-html" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: "=" (location: (1:14)-(1:15)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:15)-(1:22)) + │ │ │ ├── errors: (1 error) + │ │ │ │ └── @ UnclosedQuoteError (location: (1:15)-(1:22)) + │ │ │ │ ├── message: "Attribute value opened with ' at (1:15) was never closed." + │ │ │ │ └── opening_quote: "'" (location: (1:15)-(1:16)) + │ │ │ │ + │ │ │ ├── open_quote: "'" (location: (1:15)-(1:16)) + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:16)-(1:22)) + │ │ │ │ └── content: "text" + │ │ │ └── @ LiteralNode (location: (1:29)-(1:38)) + │ │ │ └── content: "highlight" │ │ │ - │ │ ├── close_quote: "'" (location: (1:51)-(1:52)) + │ │ ├── close_quote: """ (location: (1:38)-(1:39)) │ │ └── quoted: true │ │ │ │ │ └── is_void: false │ ├── tag_name: "div" (location: (1:1)-(1:4)) - ├── body: [] + ├── body: (3 items) + │ ├── @ HTMLTextNode (location: (1:40)-(1:44)) + │ │ └── content: "text" + │ │ + │ ├── @ HTMLCloseTagNode (location: (1:44)-(1:51)) + │ │ ├── errors: (1 error) + │ │ │ └── @ MissingOpeningTagError (location: (1:44)-(1:51)) + │ │ │ ├── message: "Found closing tag `` at (1:46) without a matching opening tag in the same scope." + │ │ │ └── closing_tag: "span" (location: (1:46)-(1:50)) + │ │ │ + │ │ ├── tag_opening: "" (location: (1:50)-(1:51)) + │ │ + │ └── @ HTMLTextNode (location: (1:51)-(1:53)) + │ └── content: "'>" + │ ├── close_tag: │ └── @ HTMLCloseTagNode (location: (1:53)-(1:59)) │ ├── tag_opening: " Date: Tue, 31 Mar 2026 10:50:10 -0600 Subject: [PATCH 5/7] Regenerate snapshots with rebuilt native extension (v0.9.3) --- ...c917b-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 38 ++------- ...e1c9e-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 42 +++++++--- ...c31a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 40 ++++++--- ...755cd-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 38 +++++++-- ...3028f-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 82 ++++++++++++------- ...9432a-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 64 +++------------ ...97a23-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 38 ++------- ...2b1a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 38 ++------- ...1ae3d-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...83f9a-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...cc487-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...cc825-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...d71ca-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 3 +- ...0d7b8-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 3 +- ...9c21a-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 16 ++-- ...50a72-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 16 ++-- ...7fe98-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 5 +- ...e3a67-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...261dc-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...995bc-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...d1f1f-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...bafe0-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 3 +- ...e04c5-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 3 +- ...58e23-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 16 ++-- ...914e9-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 5 +- ...7d54f-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 16 ++-- ...0292a-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 16 ++-- ...16ab6-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...3885b-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...50b7c-ef4af315cb33925c38d24ea3c2e8a1cd.txt | 2 +- ...uotes_e5c77f0eb3bb473c0528739accce89c5.txt | 56 ++++--------- ...uotes_196933f4d9a4449e3abaf99c44969247.txt | 56 ++++--------- ...uotes_2ad14321709dc65c50e3a497c1cff9c8.txt | 70 ++++------------ ...uotes_f549f420ee65b49739afa842180b356a.txt | 70 ++++------------ 34 files changed, 306 insertions(+), 450 deletions(-) diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0007_image_tag_with_skip_pipeline_51a3ad06b61dd39c5d6cad81140c917b-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0007_image_tag_with_skip_pipeline_51a3ad06b61dd39c5d6cad81140c917b-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 917afd7ed..1c8ad0ea7 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0007_image_tag_with_skip_pipeline_51a3ad06b61dd39c5d6cad81140c917b-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0007_image_tag_with_skip_pipeline_51a3ad06b61dd39c5d6cad81140c917b-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,42 +13,22 @@ options: {action_view_helpers: true} │ │ ├── content: " image_tag "icon.png", skip_pipeline: true " (location: (1:3)-(1:46)) │ │ ├── tag_closing: "%>" (location: (1:46)-(1:48)) │ │ ├── tag_name: "img" (location: (1:4)-(1:13)) - │ │ └── children: (2 items) - │ │ ├── @ HTMLAttributeNode (location: (1:14)-(1:24)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:14)-(1:24)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:14)-(1:24)) - │ │ │ │ └── content: "src" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: ":" (location: (1:14)-(1:24)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:14)-(1:24)) - │ │ │ ├── open_quote: ∅ - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ RubyLiteralNode (location: (1:14)-(1:24)) - │ │ │ │ └── content: "image_path(\"icon.png\")" - │ │ │ │ - │ │ │ ├── close_quote: ∅ - │ │ │ └── quoted: false - │ │ │ - │ │ │ - │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:45)) + │ │ └── children: (1 item) + │ │ └── @ HTMLAttributeNode (location: (1:14)-(1:24)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:39)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:14)-(1:24)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:26)-(1:39)) - │ │ │ └── content: "skip-pipeline" + │ │ │ └── @ LiteralNode (location: (1:14)-(1:24)) + │ │ │ └── content: "src" │ │ │ │ │ │ - │ │ ├── equals: ": " (location: (1:39)-(1:41)) + │ │ ├── equals: ":" (location: (1:14)-(1:24)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:41)-(1:45)) + │ │ └── @ HTMLAttributeValueNode (location: (1:14)-(1:24)) │ │ ├── open_quote: ∅ │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:41)-(1:45)) - │ │ │ └── content: "true" + │ │ │ └── @ RubyLiteralNode (location: (1:14)-(1:24)) + │ │ │ └── content: "image_path(\"icon.png\", skip_pipeline: true)" │ │ │ │ │ ├── close_quote: ∅ │ │ └── quoted: false diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0008_image_tag_with_static_size_WxH_786dcb30de241afa9011827f52be1c9e-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0008_image_tag_with_static_size_WxH_786dcb30de241afa9011827f52be1c9e-ef4af315cb33925c38d24ea3c2e8a1cd.txt index b07534580..b19e6ec0c 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0008_image_tag_with_static_size_WxH_786dcb30de241afa9011827f52be1c9e-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0008_image_tag_with_static_size_WxH_786dcb30de241afa9011827f52be1c9e-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,7 +13,7 @@ options: {action_view_helpers: true} │ │ ├── content: " image_tag "icon.png", size: "32x32" " (location: (1:3)-(1:40)) │ │ ├── tag_closing: "%>" (location: (1:40)-(1:42)) │ │ ├── tag_name: "img" (location: (1:4)-(1:13)) - │ │ └── children: (2 items) + │ │ └── children: (3 items) │ │ ├── @ HTMLAttributeNode (location: (1:14)-(1:24)) │ │ │ ├── name: │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:14)-(1:24)) @@ -34,23 +34,43 @@ options: {action_view_helpers: true} │ │ │ └── quoted: false │ │ │ │ │ │ - │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:39)) + │ │ ├── @ HTMLAttributeNode (location: (1:26)-(1:26)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ │ └── content: "width" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: "=" (location: (1:26)-(1:26)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) + │ │ │ ├── open_quote: """ (location: (1:26)-(1:26)) + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ │ └── content: "32" + │ │ │ │ + │ │ │ ├── close_quote: """ (location: (1:26)-(1:26)) + │ │ │ └── quoted: true + │ │ │ + │ │ │ + │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:26)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:30)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:26)-(1:30)) - │ │ │ └── content: "size" + │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ └── content: "height" │ │ │ │ │ │ - │ │ ├── equals: ": " (location: (1:30)-(1:32)) + │ │ ├── equals: "=" (location: (1:26)-(1:26)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:32)-(1:39)) - │ │ ├── open_quote: """ (location: (1:32)-(1:33)) + │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) + │ │ ├── open_quote: """ (location: (1:26)-(1:26)) │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:33)-(1:38)) - │ │ │ └── content: "32x32" + │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ └── content: "32" │ │ │ - │ │ ├── close_quote: """ (location: (1:38)-(1:39)) + │ │ ├── close_quote: """ (location: (1:26)-(1:26)) │ │ └── quoted: true │ │ │ │ diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0009_image_tag_with_static_size_N_b7439b4cd2add9699ab71226110c31a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0009_image_tag_with_static_size_N_b7439b4cd2add9699ab71226110c31a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 521d5fdd3..8d6f4fc65 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0009_image_tag_with_static_size_N_b7439b4cd2add9699ab71226110c31a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0009_image_tag_with_static_size_N_b7439b4cd2add9699ab71226110c31a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,7 +13,7 @@ options: {action_view_helpers: true} │ │ ├── content: " image_tag "icon.png", size: "32" " (location: (1:3)-(1:37)) │ │ ├── tag_closing: "%>" (location: (1:37)-(1:39)) │ │ ├── tag_name: "img" (location: (1:4)-(1:13)) - │ │ └── children: (2 items) + │ │ └── children: (3 items) │ │ ├── @ HTMLAttributeNode (location: (1:14)-(1:24)) │ │ │ ├── name: │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:14)-(1:24)) @@ -34,23 +34,43 @@ options: {action_view_helpers: true} │ │ │ └── quoted: false │ │ │ │ │ │ - │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:36)) + │ │ ├── @ HTMLAttributeNode (location: (1:26)-(1:26)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ │ └── content: "width" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: "=" (location: (1:26)-(1:26)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) + │ │ │ ├── open_quote: """ (location: (1:26)-(1:26)) + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ │ └── content: "32" + │ │ │ │ + │ │ │ ├── close_quote: """ (location: (1:26)-(1:26)) + │ │ │ └── quoted: true + │ │ │ + │ │ │ + │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:26)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:30)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:26)-(1:30)) - │ │ │ └── content: "size" + │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ └── content: "height" │ │ │ │ │ │ - │ │ ├── equals: ": " (location: (1:30)-(1:32)) + │ │ ├── equals: "=" (location: (1:26)-(1:26)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:32)-(1:36)) - │ │ ├── open_quote: """ (location: (1:32)-(1:33)) + │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) + │ │ ├── open_quote: """ (location: (1:26)-(1:26)) │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:33)-(1:35)) + │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) │ │ │ └── content: "32" │ │ │ - │ │ ├── close_quote: """ (location: (1:35)-(1:36)) + │ │ ├── close_quote: """ (location: (1:26)-(1:26)) │ │ └── quoted: true │ │ │ │ diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0010_image_tag_with_dynamic_size_42a8ce9eb0ee2da32c39164a8b1755cd-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0010_image_tag_with_dynamic_size_42a8ce9eb0ee2da32c39164a8b1755cd-ef4af315cb33925c38d24ea3c2e8a1cd.txt index dc36f7573..d3bbd5006 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0010_image_tag_with_dynamic_size_42a8ce9eb0ee2da32c39164a8b1755cd-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0010_image_tag_with_dynamic_size_42a8ce9eb0ee2da32c39164a8b1755cd-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,7 +13,7 @@ options: {action_view_helpers: true} │ │ ├── content: " image_tag "icon.png", size: some_var " (location: (1:3)-(1:41)) │ │ ├── tag_closing: "%>" (location: (1:41)-(1:43)) │ │ ├── tag_name: "img" (location: (1:4)-(1:13)) - │ │ └── children: (2 items) + │ │ └── children: (3 items) │ │ ├── @ HTMLAttributeNode (location: (1:14)-(1:24)) │ │ │ ├── name: │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:14)-(1:24)) @@ -34,21 +34,41 @@ options: {action_view_helpers: true} │ │ │ └── quoted: false │ │ │ │ │ │ - │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:40)) + │ │ ├── @ HTMLAttributeNode (location: (1:26)-(1:26)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ │ └── content: "width" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: ":" (location: (1:26)-(1:26)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) + │ │ │ ├── open_quote: ∅ + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ RubyLiteralNode (location: (1:26)-(1:26)) + │ │ │ │ └── content: "some_var.to_s.split(\"x\", 2)[0]" + │ │ │ │ + │ │ │ ├── close_quote: ∅ + │ │ │ └── quoted: false + │ │ │ + │ │ │ + │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:26)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:30)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:26)-(1:30)) - │ │ │ └── content: "size" + │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ └── content: "height" │ │ │ │ │ │ - │ │ ├── equals: ": " (location: (1:30)-(1:32)) + │ │ ├── equals: ":" (location: (1:26)-(1:26)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:32)-(1:40)) + │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) │ │ ├── open_quote: ∅ │ │ ├── children: (1 item) - │ │ │ └── @ RubyLiteralNode (location: (1:32)-(1:40)) - │ │ │ └── content: "some_var" + │ │ │ └── @ RubyLiteralNode (location: (1:26)-(1:26)) + │ │ │ └── content: "some_var.to_s.split(\"x\", 2)[-1]" │ │ │ │ │ ├── close_quote: ∅ │ │ └── quoted: false diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0011_image_tag_with_size_and_other_attributes_c56689a70a92d3a82ca94b6cd1d3028f-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0011_image_tag_with_size_and_other_attributes_c56689a70a92d3a82ca94b6cd1d3028f-ef4af315cb33925c38d24ea3c2e8a1cd.txt index c190d7ea1..965f4192a 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0011_image_tag_with_size_and_other_attributes_c56689a70a92d3a82ca94b6cd1d3028f-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/image_tag_test/test_0011_image_tag_with_size_and_other_attributes_c56689a70a92d3a82ca94b6cd1d3028f-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,7 +13,7 @@ options: {action_view_helpers: true} │ │ ├── content: " image_tag "icon.png", size: "32x32", alt: "Icon", class: "avatar" " (location: (1:3)-(1:70)) │ │ ├── tag_closing: "%>" (location: (1:70)-(1:72)) │ │ ├── tag_name: "img" (location: (1:4)-(1:13)) - │ │ └── children: (4 items) + │ │ └── children: (5 items) │ │ ├── @ HTMLAttributeNode (location: (1:14)-(1:24)) │ │ │ ├── name: │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:14)-(1:24)) @@ -34,26 +34,6 @@ options: {action_view_helpers: true} │ │ │ └── quoted: false │ │ │ │ │ │ - │ │ ├── @ HTMLAttributeNode (location: (1:26)-(1:39)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:30)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:30)) - │ │ │ │ └── content: "size" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: ": " (location: (1:30)-(1:32)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:32)-(1:39)) - │ │ │ ├── open_quote: """ (location: (1:32)-(1:33)) - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:33)-(1:38)) - │ │ │ │ └── content: "32x32" - │ │ │ │ - │ │ │ ├── close_quote: """ (location: (1:38)-(1:39)) - │ │ │ └── quoted: true - │ │ │ - │ │ │ │ │ ├── @ HTMLAttributeNode (location: (1:41)-(1:52)) │ │ │ ├── name: │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:41)-(1:44)) @@ -74,23 +54,63 @@ options: {action_view_helpers: true} │ │ │ └── quoted: true │ │ │ │ │ │ - │ │ └── @ HTMLAttributeNode (location: (1:54)-(1:69)) + │ │ ├── @ HTMLAttributeNode (location: (1:54)-(1:69)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:54)-(1:59)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:54)-(1:59)) + │ │ │ │ └── content: "class" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: ": " (location: (1:59)-(1:61)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:61)-(1:69)) + │ │ │ ├── open_quote: """ (location: (1:61)-(1:62)) + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:62)-(1:68)) + │ │ │ │ └── content: "avatar" + │ │ │ │ + │ │ │ ├── close_quote: """ (location: (1:68)-(1:69)) + │ │ │ └── quoted: true + │ │ │ + │ │ │ + │ │ ├── @ HTMLAttributeNode (location: (1:26)-(1:26)) + │ │ │ ├── name: + │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) + │ │ │ │ └── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ │ └── content: "width" + │ │ │ │ + │ │ │ │ + │ │ │ ├── equals: "=" (location: (1:26)-(1:26)) + │ │ │ └── value: + │ │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) + │ │ │ ├── open_quote: """ (location: (1:26)-(1:26)) + │ │ │ ├── children: (1 item) + │ │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ │ └── content: "32" + │ │ │ │ + │ │ │ ├── close_quote: """ (location: (1:26)-(1:26)) + │ │ │ └── quoted: true + │ │ │ + │ │ │ + │ │ └── @ HTMLAttributeNode (location: (1:26)-(1:26)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:54)-(1:59)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:26)-(1:26)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:54)-(1:59)) - │ │ │ └── content: "class" + │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ └── content: "height" │ │ │ │ │ │ - │ │ ├── equals: ": " (location: (1:59)-(1:61)) + │ │ ├── equals: "=" (location: (1:26)-(1:26)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:61)-(1:69)) - │ │ ├── open_quote: """ (location: (1:61)-(1:62)) + │ │ └── @ HTMLAttributeValueNode (location: (1:26)-(1:26)) + │ │ ├── open_quote: """ (location: (1:26)-(1:26)) │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:62)-(1:68)) - │ │ │ └── content: "avatar" + │ │ │ └── @ LiteralNode (location: (1:26)-(1:26)) + │ │ │ └── content: "32" │ │ │ - │ │ ├── close_quote: """ (location: (1:68)-(1:69)) + │ │ ├── close_quote: """ (location: (1:26)-(1:26)) │ │ └── quoted: true │ │ │ │ diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0009_javascript_include_tag_with_host_and_protocol_fb1385fa4721eab3704d50a0bce9432a-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0009_javascript_include_tag_with_host_and_protocol_fb1385fa4721eab3704d50a0bce9432a-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 2e0e76ae1..789f4b7d3 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0009_javascript_include_tag_with_host_and_protocol_fb1385fa4721eab3704d50a0bce9432a-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0009_javascript_include_tag_with_host_and_protocol_fb1385fa4721eab3704d50a0bce9432a-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,65 +13,25 @@ options: {action_view_helpers: true} │ │ ├── content: " javascript_include_tag "xmlhr", host: "localhost", protocol: "https" " (location: (1:3)-(1:73)) │ │ ├── tag_closing: "%>" (location: (1:73)-(1:75)) │ │ ├── tag_name: "script" (location: (1:4)-(1:26)) - │ │ └── children: (3 items) - │ │ ├── @ HTMLAttributeNode (location: (1:27)-(1:34)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:27)-(1:34)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:27)-(1:34)) - │ │ │ │ └── content: "src" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: ":" (location: (1:27)-(1:34)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:27)-(1:34)) - │ │ │ ├── open_quote: ∅ - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ RubyLiteralNode (location: (1:27)-(1:34)) - │ │ │ │ └── content: "javascript_path(\"xmlhr\")" - │ │ │ │ - │ │ │ ├── close_quote: ∅ - │ │ │ └── quoted: false - │ │ │ - │ │ │ - │ │ ├── @ HTMLAttributeNode (location: (1:36)-(1:53)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:36)-(1:40)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:36)-(1:40)) - │ │ │ │ └── content: "host" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: ": " (location: (1:40)-(1:42)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:42)-(1:53)) - │ │ │ ├── open_quote: """ (location: (1:42)-(1:43)) - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:43)-(1:52)) - │ │ │ │ └── content: "localhost" - │ │ │ │ - │ │ │ ├── close_quote: """ (location: (1:52)-(1:53)) - │ │ │ └── quoted: true - │ │ │ - │ │ │ - │ │ └── @ HTMLAttributeNode (location: (1:55)-(1:72)) + │ │ └── children: (1 item) + │ │ └── @ HTMLAttributeNode (location: (1:27)-(1:34)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:55)-(1:63)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:27)-(1:34)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:55)-(1:63)) - │ │ │ └── content: "protocol" + │ │ │ └── @ LiteralNode (location: (1:27)-(1:34)) + │ │ │ └── content: "src" │ │ │ │ │ │ - │ │ ├── equals: ": " (location: (1:63)-(1:65)) + │ │ ├── equals: ":" (location: (1:27)-(1:34)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:65)-(1:72)) - │ │ ├── open_quote: """ (location: (1:65)-(1:66)) + │ │ └── @ HTMLAttributeValueNode (location: (1:27)-(1:34)) + │ │ ├── open_quote: ∅ │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:66)-(1:71)) - │ │ │ └── content: "https" + │ │ │ └── @ RubyLiteralNode (location: (1:27)-(1:34)) + │ │ │ └── content: "javascript_path(\"xmlhr\", host: \"localhost\", protocol: \"https\")" │ │ │ - │ │ ├── close_quote: """ (location: (1:71)-(1:72)) - │ │ └── quoted: true + │ │ ├── close_quote: ∅ + │ │ └── quoted: false │ │ │ │ │ │ diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0014_javascript_include_tag_with_extname_false_4b2b3e63490f91e30f0cb8ab0a897a23-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0014_javascript_include_tag_with_extname_false_4b2b3e63490f91e30f0cb8ab0a897a23-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 87ae7b3cc..fc7c8efd5 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0014_javascript_include_tag_with_extname_false_4b2b3e63490f91e30f0cb8ab0a897a23-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0014_javascript_include_tag_with_extname_false_4b2b3e63490f91e30f0cb8ab0a897a23-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,42 +13,22 @@ options: {action_view_helpers: true} │ │ ├── content: " javascript_include_tag "template.jst", extname: false " (location: (1:3)-(1:58)) │ │ ├── tag_closing: "%>" (location: (1:58)-(1:60)) │ │ ├── tag_name: "script" (location: (1:4)-(1:26)) - │ │ └── children: (2 items) - │ │ ├── @ HTMLAttributeNode (location: (1:27)-(1:41)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:27)-(1:41)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:27)-(1:41)) - │ │ │ │ └── content: "src" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: ":" (location: (1:27)-(1:41)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:27)-(1:41)) - │ │ │ ├── open_quote: ∅ - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ RubyLiteralNode (location: (1:27)-(1:41)) - │ │ │ │ └── content: "javascript_path(\"template.jst\")" - │ │ │ │ - │ │ │ ├── close_quote: ∅ - │ │ │ └── quoted: false - │ │ │ - │ │ │ - │ │ └── @ HTMLAttributeNode (location: (1:43)-(1:57)) + │ │ └── children: (1 item) + │ │ └── @ HTMLAttributeNode (location: (1:27)-(1:41)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:43)-(1:50)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:27)-(1:41)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:43)-(1:50)) - │ │ │ └── content: "extname" + │ │ │ └── @ LiteralNode (location: (1:27)-(1:41)) + │ │ │ └── content: "src" │ │ │ │ │ │ - │ │ ├── equals: ": " (location: (1:50)-(1:52)) + │ │ ├── equals: ":" (location: (1:27)-(1:41)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:52)-(1:57)) + │ │ └── @ HTMLAttributeValueNode (location: (1:27)-(1:41)) │ │ ├── open_quote: ∅ │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:52)-(1:57)) - │ │ │ └── content: "false" + │ │ │ └── @ RubyLiteralNode (location: (1:27)-(1:41)) + │ │ │ └── content: "javascript_path(\"template.jst\", extname: false)" │ │ │ │ │ ├── close_quote: ∅ │ │ └── quoted: false diff --git a/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0020_javascript_include_tag_with_skip_pipeline_543363d10e02fc9222ffe0746a52b1a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0020_javascript_include_tag_with_skip_pipeline_543363d10e02fc9222ffe0746a52b1a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt index e5c4cba78..0654e53fd 100644 --- a/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0020_javascript_include_tag_with_skip_pipeline_543363d10e02fc9222ffe0746a52b1a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/asset_tag_helper/java_script_include_tag_test/test_0020_javascript_include_tag_with_skip_pipeline_543363d10e02fc9222ffe0746a52b1a9-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -13,42 +13,22 @@ options: {action_view_helpers: true} │ │ ├── content: " javascript_include_tag "application", skip_pipeline: true " (location: (1:3)-(1:62)) │ │ ├── tag_closing: "%>" (location: (1:62)-(1:64)) │ │ ├── tag_name: "script" (location: (1:4)-(1:26)) - │ │ └── children: (2 items) - │ │ ├── @ HTMLAttributeNode (location: (1:27)-(1:40)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:27)-(1:40)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:27)-(1:40)) - │ │ │ │ └── content: "src" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: ":" (location: (1:27)-(1:40)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:27)-(1:40)) - │ │ │ ├── open_quote: ∅ - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ RubyLiteralNode (location: (1:27)-(1:40)) - │ │ │ │ └── content: "javascript_path(\"application\")" - │ │ │ │ - │ │ │ ├── close_quote: ∅ - │ │ │ └── quoted: false - │ │ │ - │ │ │ - │ │ └── @ HTMLAttributeNode (location: (1:42)-(1:61)) + │ │ └── children: (1 item) + │ │ └── @ HTMLAttributeNode (location: (1:27)-(1:40)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:42)-(1:55)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:27)-(1:40)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:42)-(1:55)) - │ │ │ └── content: "skip-pipeline" + │ │ │ └── @ LiteralNode (location: (1:27)-(1:40)) + │ │ │ └── content: "src" │ │ │ │ │ │ - │ │ ├── equals: ": " (location: (1:55)-(1:57)) + │ │ ├── equals: ":" (location: (1:27)-(1:40)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:57)-(1:61)) + │ │ └── @ HTMLAttributeValueNode (location: (1:27)-(1:40)) │ │ ├── open_quote: ∅ │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:57)-(1:61)) - │ │ │ └── content: "true" + │ │ │ └── @ RubyLiteralNode (location: (1:27)-(1:40)) + │ │ │ └── content: "javascript_path(\"application\", skip_pipeline: true)" │ │ │ │ │ ├── close_quote: ∅ │ │ └── quoted: false diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0013_content_tag_with_attributes_splat_4d156cb87fff23ce3c0bd404a3f1ae3d-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0013_content_tag_with_attributes_splat_4d156cb87fff23ce3c0bd404a3f1ae3d-ef4af315cb33925c38d24ea3c2e8a1cd.txt index d63818c24..9f2eb6ec4 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0013_content_tag_with_attributes_splat_4d156cb87fff23ce3c0bd404a3f1ae3d-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0013_content_tag_with_attributes_splat_4d156cb87fff23ce3c0bd404a3f1ae3d-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:40)-(1:40)) - │ │ ├── content: "**attributes" + │ │ ├── content: "tag.attributes(**attributes)" │ │ └── prefix: "" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0018_content_tag_with_splat_in_data_hash_0bf3419e05fbe8af1e2214255fb83f9a-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0018_content_tag_with_splat_in_data_hash_0bf3419e05fbe8af1e2214255fb83f9a-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 0a29c5fbc..20200214c 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0018_content_tag_with_splat_in_data_hash_0bf3419e05fbe8af1e2214255fb83f9a-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0018_content_tag_with_splat_in_data_hash_0bf3419e05fbe8af1e2214255fb83f9a-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:53)-(1:53)) - │ │ ├── content: "**data_attrs" + │ │ ├── content: "tag.attributes(data: data_attrs)" │ │ └── prefix: "data" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0019_content_tag_with_splat_in_aria_hash_6b42b42febf3fb7fa00731c566acc487-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0019_content_tag_with_splat_in_aria_hash_6b42b42febf3fb7fa00731c566acc487-ef4af315cb33925c38d24ea3c2e8a1cd.txt index dbee6b30b..9ea114ecd 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0019_content_tag_with_splat_in_aria_hash_6b42b42febf3fb7fa00731c566acc487-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0019_content_tag_with_splat_in_aria_hash_6b42b42febf3fb7fa00731c566acc487-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:46)-(1:46)) - │ │ ├── content: "**aria_attrs" + │ │ ├── content: "tag.attributes(aria: aria_attrs)" │ │ └── prefix: "aria" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0020_content_tag_with_only_splat_in_data_hash_b1fe2c7401b59fdecbabb5d503ccc825-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0020_content_tag_with_only_splat_in_data_hash_b1fe2c7401b59fdecbabb5d503ccc825-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 5e2d370d3..73a9d9d9d 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0020_content_tag_with_only_splat_in_data_hash_b1fe2c7401b59fdecbabb5d503ccc825-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0020_content_tag_with_only_splat_in_data_hash_b1fe2c7401b59fdecbabb5d503ccc825-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -17,7 +17,7 @@ options: {action_view_helpers: true} │ │ ├── tag_name: "div" (location: (1:4)-(1:15)) │ │ └── children: (1 item) │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:30)-(1:30)) - │ │ ├── content: "**data_attrs" + │ │ ├── content: "tag.attributes(data: data_attrs)" │ │ └── prefix: "data" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0037_content_tag_with_void_element_img_and_content_argument_reports_error_5bdb8a95466d4783db7ad280fd6d71ca-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0037_content_tag_with_void_element_img_and_content_argument_reports_error_5bdb8a95466d4783db7ad280fd6d71ca-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 0886a6a84..1c0d48bb5 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0037_content_tag_with_void_element_img_and_content_argument_reports_error_5bdb8a95466d4783db7ad280fd6d71ca-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0037_content_tag_with_void_element_img_and_content_argument_reports_error_5bdb8a95466d4783db7ad280fd6d71ca-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -11,7 +11,8 @@ options: {action_view_helpers: true} │ │ └── @ VoidElementContentError (location: (1:22)-(1:29)) │ │ ├── message: "Void element `img` cannot have content. `content_tag :img` does not accept a positional argument for content." │ │ ├── tag_name: "img" (location: (1:4)-(1:15)) - │ │ └── helper_name: "content_tag :img" + │ │ ├── helper_name: "content_tag :img" + │ │ └── content_type: "a positional argument" │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:32)) diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0038_content_tag_with_void_element_br_and_content_argument_reports_error_29c54479d2c6354145cc9b90d440d7b8-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0038_content_tag_with_void_element_br_and_content_argument_reports_error_29c54479d2c6354145cc9b90d440d7b8-ef4af315cb33925c38d24ea3c2e8a1cd.txt index c5f44b416..4b45f282d 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0038_content_tag_with_void_element_br_and_content_argument_reports_error_29c54479d2c6354145cc9b90d440d7b8-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0038_content_tag_with_void_element_br_and_content_argument_reports_error_29c54479d2c6354145cc9b90d440d7b8-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -11,7 +11,8 @@ options: {action_view_helpers: true} │ │ └── @ VoidElementContentError (location: (1:21)-(1:28)) │ │ ├── message: "Void element `br` cannot have content. `content_tag :br` does not accept a positional argument for content." │ │ ├── tag_name: "br" (location: (1:4)-(1:15)) - │ │ └── helper_name: "content_tag :br" + │ │ ├── helper_name: "content_tag :br" + │ │ └── content_type: "a positional argument" │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:31)) diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0041_content_tag_input_with_do...end_block_reports_void_element_content_error_5db23c1fe50e00c4a562ffb47419c21a-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0041_content_tag_input_with_do...end_block_reports_void_element_content_error_5db23c1fe50e00c4a562ffb47419c21a-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 2aa498966..9ef9d2636 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0041_content_tag_input_with_do...end_block_reports_void_element_content_error_5db23c1fe50e00c4a562ffb47419c21a-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0041_content_tag_input_with_do...end_block_reports_void_element_content_error_5db23c1fe50e00c4a562ffb47419c21a-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,6 +9,13 @@ options: {action_view_helpers: true} @ DocumentNode (location: (1:0)-(4:0)) └── children: (2 items) ├── @ HTMLElementNode (location: (1:0)-(3:9)) + │ ├── errors: (1 error) + │ │ └── @ VoidElementContentError (location: (1:0)-(3:9)) + │ │ ├── message: "Void element `input` cannot have content. `content_tag :input` does not accept a block for content." + │ │ ├── tag_name: "input" (location: (1:4)-(1:15)) + │ │ ├── helper_name: "content_tag :input" + │ │ └── content_type: "a block" + │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:28)) │ │ ├── tag_opening: "<%=" (location: (1:0)-(1:3)) @@ -22,13 +29,8 @@ options: {action_view_helpers: true} │ │ └── @ HTMLTextNode (location: (1:28)-(3:0)) │ │ └── content: "\n content\n" │ │ - │ ├── close_tag: - │ │ └── @ ERBEndNode (location: (3:0)-(3:9)) - │ │ ├── tag_opening: "<%" (location: (3:0)-(3:2)) - │ │ ├── content: " end " (location: (3:2)-(3:7)) - │ │ └── tag_closing: "%>" (location: (3:7)-(3:9)) - │ │ - │ ├── is_void: false + │ ├── close_tag: ∅ + │ ├── is_void: true │ └── element_source: "ActionView::Helpers::TagHelper#content_tag" │ └── @ HTMLTextNode (location: (3:9)-(4:0)) diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0042_content_tag_img_with_do...end_block_reports_void_element_content_error_7273bf89d79ff3b4b1e8d1877b550a72-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0042_content_tag_img_with_do...end_block_reports_void_element_content_error_7273bf89d79ff3b4b1e8d1877b550a72-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 479780028..2e7f482be 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0042_content_tag_img_with_do...end_block_reports_void_element_content_error_7273bf89d79ff3b4b1e8d1877b550a72-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0042_content_tag_img_with_do...end_block_reports_void_element_content_error_7273bf89d79ff3b4b1e8d1877b550a72-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,6 +9,13 @@ options: {action_view_helpers: true} @ DocumentNode (location: (1:0)-(4:0)) └── children: (2 items) ├── @ HTMLElementNode (location: (1:0)-(3:9)) + │ ├── errors: (1 error) + │ │ └── @ VoidElementContentError (location: (1:0)-(3:9)) + │ │ ├── message: "Void element `img` cannot have content. `content_tag :img` does not accept a block for content." + │ │ ├── tag_name: "img" (location: (1:4)-(1:15)) + │ │ ├── helper_name: "content_tag :img" + │ │ └── content_type: "a block" + │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:26)) │ │ ├── tag_opening: "<%=" (location: (1:0)-(1:3)) @@ -22,13 +29,8 @@ options: {action_view_helpers: true} │ │ └── @ HTMLTextNode (location: (1:26)-(3:0)) │ │ └── content: "\n content\n" │ │ - │ ├── close_tag: - │ │ └── @ ERBEndNode (location: (3:0)-(3:9)) - │ │ ├── tag_opening: "<%" (location: (3:0)-(3:2)) - │ │ ├── content: " end " (location: (3:2)-(3:7)) - │ │ └── tag_closing: "%>" (location: (3:7)-(3:9)) - │ │ - │ ├── is_void: false + │ ├── close_tag: ∅ + │ ├── is_void: true │ └── element_source: "ActionView::Helpers::TagHelper#content_tag" │ └── @ HTMLTextNode (location: (3:9)-(4:0)) diff --git a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0043_content_tag_br_with_inline_block_reports_void_element_content_error_ead021e6a1097f49ec287dad8207fe98-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0043_content_tag_br_with_inline_block_reports_void_element_content_error_ead021e6a1097f49ec287dad8207fe98-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 1f22b2849..fb9126d3e 100644 --- a/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0043_content_tag_br_with_inline_block_reports_void_element_content_error_ead021e6a1097f49ec287dad8207fe98-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/content_tag_test/test_0043_content_tag_br_with_inline_block_reports_void_element_content_error_ead021e6a1097f49ec287dad8207fe98-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,9 +9,10 @@ options: {action_view_helpers: true} ├── @ HTMLElementNode (location: (1:0)-(1:37)) │ ├── errors: (1 error) │ │ └── @ VoidElementContentError (location: (1:0)-(1:37)) - │ │ ├── message: "Void element `br` cannot have content. `content_tag :br` does not accept a positional argument for content." + │ │ ├── message: "Void element `br` cannot have content. `content_tag :br` does not accept a block for content." │ │ ├── tag_name: "br" (location: (1:4)-(1:15)) - │ │ └── helper_name: "content_tag :br" + │ │ ├── helper_name: "content_tag :br" + │ │ └── content_type: "a block" │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:37)) diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0010_tag.div_with_attributes_splat_6c58246ddb30ec682d60d5c7ea1e3a67-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0010_tag.div_with_attributes_splat_6c58246ddb30ec682d60d5c7ea1e3a67-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 7c3288247..65f044a3a 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0010_tag.div_with_attributes_splat_6c58246ddb30ec682d60d5c7ea1e3a67-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0010_tag.div_with_attributes_splat_6c58246ddb30ec682d60d5c7ea1e3a67-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:30)-(1:30)) - │ │ ├── content: "**attributes" + │ │ ├── content: "tag.attributes(**attributes)" │ │ └── prefix: "" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0015_tag.div_with_splat_in_data_hash_08e62cf8b869e6cda3da7a1d22d261dc-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0015_tag.div_with_splat_in_data_hash_08e62cf8b869e6cda3da7a1d22d261dc-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 800a4b176..131bcb9fa 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0015_tag.div_with_splat_in_data_hash_08e62cf8b869e6cda3da7a1d22d261dc-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0015_tag.div_with_splat_in_data_hash_08e62cf8b869e6cda3da7a1d22d261dc-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:43)-(1:43)) - │ │ ├── content: "**data_attrs" + │ │ ├── content: "tag.attributes(data: data_attrs)" │ │ └── prefix: "data" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0016_tag.div_with_splat_in_aria_hash_8ad32c6ed5ae6d94f82ed245eb1995bc-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0016_tag.div_with_splat_in_aria_hash_8ad32c6ed5ae6d94f82ed245eb1995bc-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 0671d250e..64404c372 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0016_tag.div_with_splat_in_aria_hash_8ad32c6ed5ae6d94f82ed245eb1995bc-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0016_tag.div_with_splat_in_aria_hash_8ad32c6ed5ae6d94f82ed245eb1995bc-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:36)-(1:36)) - │ │ ├── content: "**aria_attrs" + │ │ ├── content: "tag.attributes(aria: aria_attrs)" │ │ └── prefix: "aria" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0017_tag.div_with_only_splat_in_data_hash_d110bd06389a4674c477d2fa66dd1f1f-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0017_tag.div_with_only_splat_in_data_hash_d110bd06389a4674c477d2fa66dd1f1f-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 783eb96e9..b5e6ec5d0 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0017_tag.div_with_only_splat_in_data_hash_d110bd06389a4674c477d2fa66dd1f1f-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0017_tag.div_with_only_splat_in_data_hash_d110bd06389a4674c477d2fa66dd1f1f-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -17,7 +17,7 @@ options: {action_view_helpers: true} │ │ ├── tag_name: "div" (location: (1:8)-(1:11)) │ │ └── children: (1 item) │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:20)-(1:20)) - │ │ ├── content: "**data_attrs" + │ │ ├── content: "tag.attributes(data: data_attrs)" │ │ └── prefix: "data" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0045_tag.img_with_content_argument_reports_void_element_content_error_084e2a1a8052416f1cead9abb2dbafe0-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0045_tag.img_with_content_argument_reports_void_element_content_error_084e2a1a8052416f1cead9abb2dbafe0-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 1e8045a17..8b2926c5b 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0045_tag.img_with_content_argument_reports_void_element_content_error_084e2a1a8052416f1cead9abb2dbafe0-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0045_tag.img_with_content_argument_reports_void_element_content_error_084e2a1a8052416f1cead9abb2dbafe0-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -11,7 +11,8 @@ options: {action_view_helpers: true} │ │ └── @ VoidElementContentError (location: (1:12)-(1:24)) │ │ ├── message: "Void element `img` cannot have content. `tag.img` does not accept a positional argument for content." │ │ ├── tag_name: "img" (location: (1:8)-(1:11)) - │ │ └── helper_name: "tag.img" + │ │ ├── helper_name: "tag.img" + │ │ └── content_type: "a positional argument" │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:27)) diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0046_tag.img_with_content_argument_and_data_attributes_reports_void_element_content_error_27beafc0540b950e2d663a972bde04c5-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0046_tag.img_with_content_argument_and_data_attributes_reports_void_element_content_error_27beafc0540b950e2d663a972bde04c5-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 5e42bcd50..e1fe33809 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0046_tag.img_with_content_argument_and_data_attributes_reports_void_element_content_error_27beafc0540b950e2d663a972bde04c5-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0046_tag.img_with_content_argument_and_data_attributes_reports_void_element_content_error_27beafc0540b950e2d663a972bde04c5-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -11,7 +11,8 @@ options: {action_view_helpers: true} │ │ └── @ VoidElementContentError (location: (1:12)-(1:24)) │ │ ├── message: "Void element `img` cannot have content. `tag.img` does not accept a positional argument for content." │ │ ├── tag_name: "img" (location: (1:8)-(1:11)) - │ │ └── helper_name: "tag.img" + │ │ ├── helper_name: "tag.img" + │ │ └── content_type: "a positional argument" │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:58)) diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0081_tag.img_with_do...end_block_reports_void_element_content_error_9c1a518d614faf52dd2cc6ac7d958e23-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0081_tag.img_with_do...end_block_reports_void_element_content_error_9c1a518d614faf52dd2cc6ac7d958e23-ef4af315cb33925c38d24ea3c2e8a1cd.txt index ee0ba25ea..f15c7be37 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0081_tag.img_with_do...end_block_reports_void_element_content_error_9c1a518d614faf52dd2cc6ac7d958e23-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0081_tag.img_with_do...end_block_reports_void_element_content_error_9c1a518d614faf52dd2cc6ac7d958e23-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,6 +9,13 @@ options: {action_view_helpers: true} @ DocumentNode (location: (1:0)-(4:0)) └── children: (2 items) ├── @ HTMLElementNode (location: (1:0)-(3:9)) + │ ├── errors: (1 error) + │ │ └── @ VoidElementContentError (location: (1:0)-(3:9)) + │ │ ├── message: "Void element `img` cannot have content. `tag.img` does not accept a block for content." + │ │ ├── tag_name: "img" (location: (1:8)-(1:11)) + │ │ ├── helper_name: "tag.img" + │ │ └── content_type: "a block" + │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:30)) │ │ ├── tag_opening: "<%=" (location: (1:0)-(1:3)) @@ -42,13 +49,8 @@ options: {action_view_helpers: true} │ │ └── @ HTMLTextNode (location: (1:30)-(3:0)) │ │ └── content: "\n a\n" │ │ - │ ├── close_tag: - │ │ └── @ ERBEndNode (location: (3:0)-(3:9)) - │ │ ├── tag_opening: "<%" (location: (3:0)-(3:2)) - │ │ ├── content: " end " (location: (3:2)-(3:7)) - │ │ └── tag_closing: "%>" (location: (3:7)-(3:9)) - │ │ - │ ├── is_void: false + │ ├── close_tag: ∅ + │ ├── is_void: true │ └── element_source: "ActionView::Helpers::TagHelper#tag" │ └── @ HTMLTextNode (location: (3:9)-(4:0)) diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0082_tag.br_with_inline_block_reports_void_element_content_error_1785a65494c55b8dfb047b2b59c914e9-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0082_tag.br_with_inline_block_reports_void_element_content_error_1785a65494c55b8dfb047b2b59c914e9-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 11ef5f6a2..7efd51864 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0082_tag.br_with_inline_block_reports_void_element_content_error_1785a65494c55b8dfb047b2b59c914e9-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0082_tag.br_with_inline_block_reports_void_element_content_error_1785a65494c55b8dfb047b2b59c914e9-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,9 +9,10 @@ options: {action_view_helpers: true} ├── @ HTMLElementNode (location: (1:0)-(1:27)) │ ├── errors: (1 error) │ │ └── @ VoidElementContentError (location: (1:0)-(1:27)) - │ │ ├── message: "Void element `br` cannot have content. `tag.br` does not accept a positional argument for content." + │ │ ├── message: "Void element `br` cannot have content. `tag.br` does not accept a block for content." │ │ ├── tag_name: "br" (location: (1:8)-(1:10)) - │ │ └── helper_name: "tag.br" + │ │ ├── helper_name: "tag.br" + │ │ └── content_type: "a block" │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:27)) diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0083_tag.input_with_do...end_block_reports_void_element_content_error_ac6b504f9283bb9b2292fe8b2077d54f-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0083_tag.input_with_do...end_block_reports_void_element_content_error_ac6b504f9283bb9b2292fe8b2077d54f-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 2b9ad8206..bbadc3312 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0083_tag.input_with_do...end_block_reports_void_element_content_error_ac6b504f9283bb9b2292fe8b2077d54f-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0083_tag.input_with_do...end_block_reports_void_element_content_error_ac6b504f9283bb9b2292fe8b2077d54f-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,6 +9,13 @@ options: {action_view_helpers: true} @ DocumentNode (location: (1:0)-(4:0)) └── children: (2 items) ├── @ HTMLElementNode (location: (1:0)-(3:9)) + │ ├── errors: (1 error) + │ │ └── @ VoidElementContentError (location: (1:0)-(3:9)) + │ │ ├── message: "Void element `input` cannot have content. `tag.input` does not accept a block for content." + │ │ ├── tag_name: "input" (location: (1:8)-(1:13)) + │ │ ├── helper_name: "tag.input" + │ │ └── content_type: "a block" + │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:19)) │ │ ├── tag_opening: "<%=" (location: (1:0)-(1:3)) @@ -22,13 +29,8 @@ options: {action_view_helpers: true} │ │ └── @ HTMLTextNode (location: (1:19)-(3:0)) │ │ └── content: "\n content\n" │ │ - │ ├── close_tag: - │ │ └── @ ERBEndNode (location: (3:0)-(3:9)) - │ │ ├── tag_opening: "<%" (location: (3:0)-(3:2)) - │ │ ├── content: " end " (location: (3:2)-(3:7)) - │ │ └── tag_closing: "%>" (location: (3:7)-(3:9)) - │ │ - │ ├── is_void: false + │ ├── close_tag: ∅ + │ ├── is_void: true │ └── element_source: "ActionView::Helpers::TagHelper#tag" │ └── @ HTMLTextNode (location: (3:9)-(4:0)) diff --git a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0084_tag.hr_with_do...end_block_reports_void_element_content_error_1fde665bf2ae90beaad429e597c0292a-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0084_tag.hr_with_do...end_block_reports_void_element_content_error_1fde665bf2ae90beaad429e597c0292a-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 5ff2df3f4..61a8cd90d 100644 --- a/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0084_tag.hr_with_do...end_block_reports_void_element_content_error_1fde665bf2ae90beaad429e597c0292a-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/tag_test/test_0084_tag.hr_with_do...end_block_reports_void_element_content_error_1fde665bf2ae90beaad429e597c0292a-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -9,6 +9,13 @@ options: {action_view_helpers: true} @ DocumentNode (location: (1:0)-(4:0)) └── children: (2 items) ├── @ HTMLElementNode (location: (1:0)-(3:9)) + │ ├── errors: (1 error) + │ │ └── @ VoidElementContentError (location: (1:0)-(3:9)) + │ │ ├── message: "Void element `hr` cannot have content. `tag.hr` does not accept a block for content." + │ │ ├── tag_name: "hr" (location: (1:8)-(1:10)) + │ │ ├── helper_name: "tag.hr" + │ │ └── content_type: "a block" + │ │ │ ├── open_tag: │ │ └── @ ERBOpenTagNode (location: (1:0)-(1:33)) │ │ ├── tag_opening: "<%=" (location: (1:0)-(1:3)) @@ -42,13 +49,8 @@ options: {action_view_helpers: true} │ │ └── @ HTMLTextNode (location: (1:33)-(3:0)) │ │ └── content: "\n content\n" │ │ - │ ├── close_tag: - │ │ └── @ ERBEndNode (location: (3:0)-(3:9)) - │ │ ├── tag_opening: "<%" (location: (3:0)-(3:2)) - │ │ ├── content: " end " (location: (3:2)-(3:7)) - │ │ └── tag_closing: "%>" (location: (3:7)-(3:9)) - │ │ - │ ├── is_void: false + │ ├── close_tag: ∅ + │ ├── is_void: true │ └── element_source: "ActionView::Helpers::TagHelper#tag" │ └── @ HTMLTextNode (location: (3:9)-(4:0)) diff --git a/test/snapshots/analyze/action_view/tag_helper/turbo_frame_tag_test/test_0010_turbo_frame_tag_with_attributes_splat_df5fcd88eeb491a403b626e1ee216ab6-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/tag_helper/turbo_frame_tag_test/test_0010_turbo_frame_tag_with_attributes_splat_df5fcd88eeb491a403b626e1ee216ab6-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 3e47cde54..a7a4f43e2 100644 --- a/test/snapshots/analyze/action_view/tag_helper/turbo_frame_tag_test/test_0010_turbo_frame_tag_with_attributes_splat_df5fcd88eeb491a403b626e1ee216ab6-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/tag_helper/turbo_frame_tag_test/test_0010_turbo_frame_tag_with_attributes_splat_df5fcd88eeb491a403b626e1ee216ab6-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -37,7 +37,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:28)-(1:28)) - │ │ ├── content: "**attributes" + │ │ ├── content: "tag.attributes(**attributes)" │ │ └── prefix: "" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0044_link_to_with_inline_block_and_variable_options_52dcd6e5548da50405eeca6035f3885b-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0044_link_to_with_inline_block_and_variable_options_52dcd6e5548da50405eeca6035f3885b-ef4af315cb33925c38d24ea3c2e8a1cd.txt index 9c71fb160..3708e6788 100644 --- a/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0044_link_to_with_inline_block_and_variable_options_52dcd6e5548da50405eeca6035f3885b-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0044_link_to_with_inline_block_and_variable_options_52dcd6e5548da50405eeca6035f3885b-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -35,7 +35,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:22)-(1:22)) - │ │ ├── content: "html_opts" + │ │ ├── content: "tag.attributes(**html_opts)" │ │ └── prefix: "" │ │ │ │ diff --git a/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0045_link_to_with_inline_block_and_path_helper_with_variable_options_4ef0d7199cab190bc199910810c50b7c-ef4af315cb33925c38d24ea3c2e8a1cd.txt b/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0045_link_to_with_inline_block_and_path_helper_with_variable_options_4ef0d7199cab190bc199910810c50b7c-ef4af315cb33925c38d24ea3c2e8a1cd.txt index afe90cdd2..79f795245 100644 --- a/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0045_link_to_with_inline_block_and_path_helper_with_variable_options_4ef0d7199cab190bc199910810c50b7c-ef4af315cb33925c38d24ea3c2e8a1cd.txt +++ b/test/snapshots/analyze/action_view/url_helper/link_to_test/test_0045_link_to_with_inline_block_and_path_helper_with_variable_options_4ef0d7199cab190bc199910810c50b7c-ef4af315cb33925c38d24ea3c2e8a1cd.txt @@ -35,7 +35,7 @@ options: {action_view_helpers: true} │ │ │ │ │ │ │ │ └── @ RubyHTMLAttributesSplatNode (location: (1:23)-(1:23)) - │ │ ├── content: "options" + │ │ ├── content: "tag.attributes(**options)" │ │ └── prefix: "" │ │ │ │ diff --git a/test/snapshots/parser/attributes_test/test_0122_attribute_value_with_HTML_content_in_double_quotes_e5c77f0eb3bb473c0528739accce89c5.txt b/test/snapshots/parser/attributes_test/test_0122_attribute_value_with_HTML_content_in_double_quotes_e5c77f0eb3bb473c0528739accce89c5.txt index 580da7173..738cfbb0b 100644 --- a/test/snapshots/parser/attributes_test/test_0122_attribute_value_with_HTML_content_in_double_quotes_e5c77f0eb3bb473c0528739accce89c5.txt +++ b/test/snapshots/parser/attributes_test/test_0122_attribute_value_with_HTML_content_in_double_quotes_e5c77f0eb3bb473c0528739accce89c5.txt @@ -6,63 +6,35 @@ input: "" └── children: (1 item) └── @ HTMLElementNode (location: (1:0)-(1:46)) ├── open_tag: - │ └── @ HTMLOpenTagNode (location: (1:0)-(1:35)) + │ └── @ HTMLOpenTagNode (location: (1:0)-(1:37)) │ ├── tag_opening: "<" (location: (1:0)-(1:1)) │ ├── tag_name: "iframe" (location: (1:1)-(1:7)) - │ ├── tag_closing: ">" (location: (1:34)-(1:35)) - │ ├── children: (2 items) - │ │ ├── @ HTMLAttributeNode (location: (1:8)-(1:22)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:8)-(1:14)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:8)-(1:14)) - │ │ │ │ └── content: "srcdoc" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: "=" (location: (1:14)-(1:15)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:15)-(1:22)) - │ │ │ ├── errors: (1 error) - │ │ │ │ └── @ UnclosedQuoteError (location: (1:15)-(1:22)) - │ │ │ │ ├── message: "Attribute value opened with \" at (1:15) was never closed." - │ │ │ │ └── opening_quote: """ (location: (1:15)-(1:16)) - │ │ │ │ - │ │ │ ├── open_quote: """ (location: (1:15)-(1:16)) - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:16)-(1:22)) - │ │ │ │ └── content: "" (location: (1:36)-(1:37)) + │ ├── children: (1 item) + │ │ └── @ HTMLAttributeNode (location: (1:8)-(1:36)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:22)-(1:28)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:8)-(1:14)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:22)-(1:28)) - │ │ │ └── content: "target" + │ │ │ └── @ LiteralNode (location: (1:8)-(1:14)) + │ │ │ └── content: "srcdoc" │ │ │ │ │ │ - │ │ ├── equals: "=" (location: (1:28)-(1:29)) + │ │ ├── equals: "=" (location: (1:14)-(1:15)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:29)-(1:34)) - │ │ ├── open_quote: "'" (location: (1:29)-(1:30)) + │ │ └── @ HTMLAttributeValueNode (location: (1:15)-(1:36)) + │ │ ├── open_quote: """ (location: (1:15)-(1:16)) │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:30)-(1:33)) - │ │ │ └── content: "foo" + │ │ │ └── @ LiteralNode (location: (1:16)-(1:35)) + │ │ │ └── content: "" │ │ │ - │ │ ├── close_quote: "'" (location: (1:33)-(1:34)) + │ │ ├── close_quote: """ (location: (1:35)-(1:36)) │ │ └── quoted: true │ │ │ │ │ └── is_void: false │ ├── tag_name: "iframe" (location: (1:1)-(1:7)) - ├── body: (1 item) - │ └── @ HTMLTextNode (location: (1:35)-(1:37)) - │ └── content: "\">" - │ + ├── body: [] ├── close_tag: │ └── @ HTMLCloseTagNode (location: (1:37)-(1:46)) │ ├── tag_opening: "'>" └── children: (1 item) └── @ HTMLElementNode (location: (1:0)-(1:46)) ├── open_tag: - │ └── @ HTMLOpenTagNode (location: (1:0)-(1:35)) + │ └── @ HTMLOpenTagNode (location: (1:0)-(1:37)) │ ├── tag_opening: "<" (location: (1:0)-(1:1)) │ ├── tag_name: "iframe" (location: (1:1)-(1:7)) - │ ├── tag_closing: ">" (location: (1:34)-(1:35)) - │ ├── children: (2 items) - │ │ ├── @ HTMLAttributeNode (location: (1:8)-(1:22)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:8)-(1:14)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:8)-(1:14)) - │ │ │ │ └── content: "srcdoc" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: "=" (location: (1:14)-(1:15)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:15)-(1:22)) - │ │ │ ├── errors: (1 error) - │ │ │ │ └── @ UnclosedQuoteError (location: (1:15)-(1:22)) - │ │ │ │ ├── message: "Attribute value opened with ' at (1:15) was never closed." - │ │ │ │ └── opening_quote: "'" (location: (1:15)-(1:16)) - │ │ │ │ - │ │ │ ├── open_quote: "'" (location: (1:15)-(1:16)) - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:16)-(1:22)) - │ │ │ │ └── content: "" (location: (1:36)-(1:37)) + │ ├── children: (1 item) + │ │ └── @ HTMLAttributeNode (location: (1:8)-(1:36)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:22)-(1:28)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:8)-(1:14)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:22)-(1:28)) - │ │ │ └── content: "target" + │ │ │ └── @ LiteralNode (location: (1:8)-(1:14)) + │ │ │ └── content: "srcdoc" │ │ │ │ │ │ - │ │ ├── equals: "=" (location: (1:28)-(1:29)) + │ │ ├── equals: "=" (location: (1:14)-(1:15)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:29)-(1:34)) - │ │ ├── open_quote: """ (location: (1:29)-(1:30)) + │ │ └── @ HTMLAttributeValueNode (location: (1:15)-(1:36)) + │ │ ├── open_quote: "'" (location: (1:15)-(1:16)) │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:30)-(1:33)) - │ │ │ └── content: "foo" + │ │ │ └── @ LiteralNode (location: (1:16)-(1:35)) + │ │ │ └── content: "" │ │ │ - │ │ ├── close_quote: """ (location: (1:33)-(1:34)) + │ │ ├── close_quote: "'" (location: (1:35)-(1:36)) │ │ └── quoted: true │ │ │ │ │ └── is_void: false │ ├── tag_name: "iframe" (location: (1:1)-(1:7)) - ├── body: (1 item) - │ └── @ HTMLTextNode (location: (1:35)-(1:37)) - │ └── content: "'>" - │ + ├── body: [] ├── close_tag: │ └── @ HTMLCloseTagNode (location: (1:37)-(1:46)) │ ├── tag_opening: "text\">" └── children: (1 item) └── @ HTMLElementNode (location: (1:0)-(1:59)) ├── open_tag: - │ └── @ HTMLOpenTagNode (location: (1:0)-(1:40)) + │ └── @ HTMLOpenTagNode (location: (1:0)-(1:53)) │ ├── tag_opening: "<" (location: (1:0)-(1:1)) │ ├── tag_name: "div" (location: (1:1)-(1:4)) - │ ├── tag_closing: ">" (location: (1:39)-(1:40)) - │ ├── children: (2 items) - │ │ ├── @ HTMLAttributeNode (location: (1:5)-(1:22)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:5)-(1:14)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:5)-(1:14)) - │ │ │ │ └── content: "data-html" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: "=" (location: (1:14)-(1:15)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:15)-(1:22)) - │ │ │ ├── errors: (1 error) - │ │ │ │ └── @ UnclosedQuoteError (location: (1:15)-(1:22)) - │ │ │ │ ├── message: "Attribute value opened with \" at (1:15) was never closed." - │ │ │ │ └── opening_quote: """ (location: (1:15)-(1:16)) - │ │ │ │ - │ │ │ ├── open_quote: """ (location: (1:15)-(1:16)) - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:16)-(1:22)) - │ │ │ │ └── content: "" (location: (1:52)-(1:53)) + │ ├── children: (1 item) + │ │ └── @ HTMLAttributeNode (location: (1:5)-(1:52)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:22)-(1:27)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:5)-(1:14)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:22)-(1:27)) - │ │ │ └── content: "class" + │ │ │ └── @ LiteralNode (location: (1:5)-(1:14)) + │ │ │ └── content: "data-html" │ │ │ │ │ │ - │ │ ├── equals: "=" (location: (1:27)-(1:28)) + │ │ ├── equals: "=" (location: (1:14)-(1:15)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:28)-(1:39)) - │ │ ├── open_quote: "'" (location: (1:28)-(1:29)) + │ │ └── @ HTMLAttributeValueNode (location: (1:15)-(1:52)) + │ │ ├── open_quote: """ (location: (1:15)-(1:16)) │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:29)-(1:38)) - │ │ │ └── content: "highlight" + │ │ │ └── @ LiteralNode (location: (1:16)-(1:51)) + │ │ │ └── content: "text" │ │ │ - │ │ ├── close_quote: "'" (location: (1:38)-(1:39)) + │ │ ├── close_quote: """ (location: (1:51)-(1:52)) │ │ └── quoted: true │ │ │ │ │ └── is_void: false │ ├── tag_name: "div" (location: (1:1)-(1:4)) - ├── body: (3 items) - │ ├── @ HTMLTextNode (location: (1:40)-(1:44)) - │ │ └── content: "text" - │ │ - │ ├── @ HTMLCloseTagNode (location: (1:44)-(1:51)) - │ │ ├── errors: (1 error) - │ │ │ └── @ MissingOpeningTagError (location: (1:44)-(1:51)) - │ │ │ ├── message: "Found closing tag `` at (1:46) without a matching opening tag in the same scope." - │ │ │ └── closing_tag: "span" (location: (1:46)-(1:50)) - │ │ │ - │ │ ├── tag_opening: "" (location: (1:50)-(1:51)) - │ │ - │ └── @ HTMLTextNode (location: (1:51)-(1:53)) - │ └── content: "\">" - │ + ├── body: [] ├── close_tag: │ └── @ HTMLCloseTagNode (location: (1:53)-(1:59)) │ ├── tag_opening: "text'>" └── children: (1 item) └── @ HTMLElementNode (location: (1:0)-(1:59)) ├── open_tag: - │ └── @ HTMLOpenTagNode (location: (1:0)-(1:40)) + │ └── @ HTMLOpenTagNode (location: (1:0)-(1:53)) │ ├── tag_opening: "<" (location: (1:0)-(1:1)) │ ├── tag_name: "div" (location: (1:1)-(1:4)) - │ ├── tag_closing: ">" (location: (1:39)-(1:40)) - │ ├── children: (2 items) - │ │ ├── @ HTMLAttributeNode (location: (1:5)-(1:22)) - │ │ │ ├── name: - │ │ │ │ └── @ HTMLAttributeNameNode (location: (1:5)-(1:14)) - │ │ │ │ └── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:5)-(1:14)) - │ │ │ │ └── content: "data-html" - │ │ │ │ - │ │ │ │ - │ │ │ ├── equals: "=" (location: (1:14)-(1:15)) - │ │ │ └── value: - │ │ │ └── @ HTMLAttributeValueNode (location: (1:15)-(1:22)) - │ │ │ ├── errors: (1 error) - │ │ │ │ └── @ UnclosedQuoteError (location: (1:15)-(1:22)) - │ │ │ │ ├── message: "Attribute value opened with ' at (1:15) was never closed." - │ │ │ │ └── opening_quote: "'" (location: (1:15)-(1:16)) - │ │ │ │ - │ │ │ ├── open_quote: "'" (location: (1:15)-(1:16)) - │ │ │ ├── children: (1 item) - │ │ │ │ └── @ LiteralNode (location: (1:16)-(1:22)) - │ │ │ │ └── content: "" (location: (1:52)-(1:53)) + │ ├── children: (1 item) + │ │ └── @ HTMLAttributeNode (location: (1:5)-(1:52)) │ │ ├── name: - │ │ │ └── @ HTMLAttributeNameNode (location: (1:22)-(1:27)) + │ │ │ └── @ HTMLAttributeNameNode (location: (1:5)-(1:14)) │ │ │ └── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:22)-(1:27)) - │ │ │ └── content: "class" + │ │ │ └── @ LiteralNode (location: (1:5)-(1:14)) + │ │ │ └── content: "data-html" │ │ │ │ │ │ - │ │ ├── equals: "=" (location: (1:27)-(1:28)) + │ │ ├── equals: "=" (location: (1:14)-(1:15)) │ │ └── value: - │ │ └── @ HTMLAttributeValueNode (location: (1:28)-(1:39)) - │ │ ├── open_quote: """ (location: (1:28)-(1:29)) + │ │ └── @ HTMLAttributeValueNode (location: (1:15)-(1:52)) + │ │ ├── open_quote: "'" (location: (1:15)-(1:16)) │ │ ├── children: (1 item) - │ │ │ └── @ LiteralNode (location: (1:29)-(1:38)) - │ │ │ └── content: "highlight" + │ │ │ └── @ LiteralNode (location: (1:16)-(1:51)) + │ │ │ └── content: "text" │ │ │ - │ │ ├── close_quote: """ (location: (1:38)-(1:39)) + │ │ ├── close_quote: "'" (location: (1:51)-(1:52)) │ │ └── quoted: true │ │ │ │ │ └── is_void: false │ ├── tag_name: "div" (location: (1:1)-(1:4)) - ├── body: (3 items) - │ ├── @ HTMLTextNode (location: (1:40)-(1:44)) - │ │ └── content: "text" - │ │ - │ ├── @ HTMLCloseTagNode (location: (1:44)-(1:51)) - │ │ ├── errors: (1 error) - │ │ │ └── @ MissingOpeningTagError (location: (1:44)-(1:51)) - │ │ │ ├── message: "Found closing tag `` at (1:46) without a matching opening tag in the same scope." - │ │ │ └── closing_tag: "span" (location: (1:46)-(1:50)) - │ │ │ - │ │ ├── tag_opening: "" (location: (1:50)-(1:51)) - │ │ - │ └── @ HTMLTextNode (location: (1:51)-(1:53)) - │ └── content: "'>" - │ + ├── body: [] ├── close_tag: │ └── @ HTMLCloseTagNode (location: (1:53)-(1:59)) │ ├── tag_opening: " Date: Sat, 1 Aug 2026 18:06:05 +0200 Subject: [PATCH 6/7] RuboCop --- test/engine/whitespace_trimming_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/engine/whitespace_trimming_test.rb b/test/engine/whitespace_trimming_test.rb index 66fa4e9db..b66c13665 100644 --- a/test/engine/whitespace_trimming_test.rb +++ b/test/engine/whitespace_trimming_test.rb @@ -442,7 +442,7 @@ class WhitespaceTrimmingTest < Minitest::Spec assert_compiled_snapshot(template) assert_evaluated_snapshot(template, enforce_erubi_equality: true) end - + test "multi-line code block preserves line count parity with erubi" do template = "<%\n x = 1\n y = 2\n%>\n<%= x %>" From cfb9ed7e6b58198f4a81d855f090a752566095db Mon Sep 17 00:00:00 2001 From: Marco Roth Date: Sat, 1 Aug 2026 18:12:46 +0200 Subject: [PATCH 7/7] Update snapshot --- ...ount_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename test/snapshots/engine/whitespace_trimming_test/{test_0045_multi-line_code_block_preserves_line_count_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt => test_0056_multi-line_code_block_preserves_line_count_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt} (75%) diff --git a/test/snapshots/engine/whitespace_trimming_test/test_0045_multi-line_code_block_preserves_line_count_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt b/test/snapshots/engine/whitespace_trimming_test/test_0056_multi-line_code_block_preserves_line_count_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt similarity index 75% rename from test/snapshots/engine/whitespace_trimming_test/test_0045_multi-line_code_block_preserves_line_count_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt rename to test/snapshots/engine/whitespace_trimming_test/test_0056_multi-line_code_block_preserves_line_count_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt index 3143cbef1..0118a1963 100644 --- a/test/snapshots/engine/whitespace_trimming_test/test_0045_multi-line_code_block_preserves_line_count_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt +++ b/test/snapshots/engine/whitespace_trimming_test/test_0056_multi-line_code_block_preserves_line_count_parity_with_erubi_056ad410b82f521050ab536ab6d01f5f.txt @@ -1,5 +1,5 @@ --- -source: "Engine::WhitespaceTrimmingTest#test_0045_multi-line code block preserves line count parity with erubi" +source: "Engine::WhitespaceTrimmingTest#test_0056_multi-line code block preserves line count parity with erubi" input: "{source: \"<%\\n x = 1\\n y = 2\\n%>\\n<%= x %>\", options: {}}" --- _buf = ::String.new;