From 58bc3af08da49d3a3fa3e0f5bc44bf3931bce688 Mon Sep 17 00:00:00 2001
From: Earl Warren <contact@earl-warren.org>
Date: Mon, 4 Mar 2024 06:54:36 +0800
Subject: [PATCH] Refactor some Str2html code (followup)

* [BUG] Restrict when to make link absolute in markdown
---
 modules/markup/markdown/markdown_test.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/markup/markdown/markdown_test.go b/modules/markup/markdown/markdown_test.go
index 0e1216618a..e7c496a913 100644
--- a/modules/markup/markdown/markdown_test.go
+++ b/modules/markup/markdown/markdown_test.go
@@ -742,7 +742,7 @@ Citation needed[^0].`,
 	for _, test := range testcases {
 		res, err := markdown.RenderString(&markup.RenderContext{Ctx: git.DefaultContext}, test.testcase)
 		assert.NoError(t, err, "Unexpected error in testcase: %q", test.testcase)
-		assert.Equal(t, test.expected, res, "Unexpected result in testcase %q", test.testcase)
+		assert.Equal(t, test.expected, string(res), "Unexpected result in testcase %q", test.testcase)
 	}
 }
 
@@ -1189,7 +1189,7 @@ func TestCustomMarkdownURL(t *testing.T) {
 			},
 		}, input)
 		assert.NoError(t, err)
-		assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer))
+		assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(string(buffer)))
 	}
 
 	test("[test](abp:subscribe?location=https://codeberg.org/filters.txt&amp;title=joy)",