mirror of
https://github.com/miniflux/v2.git
synced 2025-08-16 18:01:37 +00:00
Improve content scraper
This commit is contained in:
parent
827683ab59
commit
c6d9eb3614
7 changed files with 39 additions and 3 deletions
|
@ -58,3 +58,13 @@ func TestRewriteWithXkcdAndNoImage(t *testing.T) {
|
|||
t.Errorf(`Not expected output: got "%s" instead of "%s"`, output, expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRewriteWithPDFLink(t *testing.T) {
|
||||
description := "test"
|
||||
output := Rewriter("https://example.org/document.pdf", description, ``)
|
||||
expected := `<a href="https://example.org/document.pdf">PDF</a><br>test`
|
||||
|
||||
if expected != output {
|
||||
t.Errorf(`Not expected output: got "%s" instead of "%s"`, output, expected)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue