diff options
author | 2024-04-23 20:08:09 -0700 | |
---|---|---|
committer | 2024-04-23 20:31:52 -0700 | |
commit | fb075b60b5d8f74d157d12cf66e32fe9580cf3fe (patch) | |
tree | 2539a39cd8e1b5c07a64e759cc52a28734c1255c /internal/reader/processor/processor_test.go | |
parent | 2c4c845cd2b40cfd468868efff7d4ba350124b47 (diff) | |
download | v2-fb075b60b5d8f74d157d12cf66e32fe9580cf3fe.tar.gz v2-fb075b60b5d8f74d157d12cf66e32fe9580cf3fe.tar.zst v2-fb075b60b5d8f74d157d12cf66e32fe9580cf3fe.zip |
reader/processor: minifier is breaking HTML entry content
Diffstat (limited to 'internal/reader/processor/processor_test.go')
-rw-r--r-- | internal/reader/processor/processor_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/reader/processor/processor_test.go b/internal/reader/processor/processor_test.go index e99a566a..48ae2d6b 100644 --- a/internal/reader/processor/processor_test.go +++ b/internal/reader/processor/processor_test.go @@ -117,3 +117,12 @@ func TestIsRecentEntry(t *testing.T) { } } } + +func TestMinifyEntryContent(t *testing.T) { + input := `<p> Some text with a <a href="http://example.org/"> link </a> </p>` + expected := `<p>Some text with a <a href="http://example.org/">link</a></p>` + result := minifyEntryContent(input) + if expected != result { + t.Errorf(`Unexpected result, got %q`, result) + } +} |