From 2c0c5b628fd0b8e7499574d379b4138630f886d7 Mon Sep 17 00:00:00 2001 From: Adam Scarr Date: Sun, 6 Aug 2017 17:28:34 +1000 Subject: Add String parser --- html/html_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'html/html_test.go') diff --git a/html/html_test.go b/html/html_test.go index 6dca6d4..defdc10 100644 --- a/html/html_test.go +++ b/html/html_test.go @@ -8,10 +8,10 @@ import ( ) func TestParse(t *testing.T) { - result, _, err := Parse("hello world") + result, _, err := Parse(`hello

world

`) require.NoError(t, err) require.Equal(t, Tag{Name: "body", Attributes: map[string]string{}, Body: []Node{ "hello ", - Tag{Name: "b", Attributes: map[string]string{}, Body: []Node{"world"}}, + Tag{Name: "p", Attributes: map[string]string{"color": "blue"}, Body: []Node{"world"}}, }}, result) } -- cgit v1.2.3