From 9654ad8144569738b865e703dd3e4900fa0a643d Mon Sep 17 00:00:00 2001 From: Brian Cardarella Date: Fri, 7 Mar 2025 10:51:58 -0500 Subject: [PATCH] Ensure markup comments are parsed properly --- lib/live_view_native/template/parser.ex | 2 +- test/live_view_native/template/parser_test.exs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/live_view_native/template/parser.ex b/lib/live_view_native/template/parser.ex index efd0b0d..56f7556 100644 --- a/lib/live_view_native/template/parser.ex +++ b/lib/live_view_native/template/parser.ex @@ -184,7 +184,7 @@ defmodule LiveViewNative.Template.Parser do comment = List.to_string(buffer) - {:ok, {document, [comment: comment], cursor}} + {:ok, {document, {:comment, comment}, cursor}} end defp parse_comment_node(<>, cursor, buffer, args) do diff --git a/test/live_view_native/template/parser_test.exs b/test/live_view_native/template/parser_test.exs index dac3544..ae544d1 100644 --- a/test/live_view_native/template/parser_test.exs +++ b/test/live_view_native/template/parser_test.exs @@ -119,9 +119,9 @@ defmodule LiveViewNative.Template.ParserTest do assert nodes == [ {"FooBar", [], []}, - [comment: " \n\n"], + {:comment, " \n\n"}, {"FooBar", [], [ - [comment: " "] + {:comment, " "} ]} ] end