mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Basic table removal rule
This commit is contained in:
parent
9a826bbe6f
commit
49d2596fc6
3 changed files with 43 additions and 0 deletions
|
@ -325,3 +325,13 @@ func TestRewriteBase64DecodeArgs(t *testing.T) {
|
|||
t.Errorf(`Not expected output: got "%s" instead of "%s"`, output, expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRewriteRemoveTables(t *testing.T) {
|
||||
content := `<table class="container"><tbody><tr><td><p>Test</p><table class="row"><tbody><tr><td>Hello World!</td></tr></tbody></table></td></tr></tbody></table>`
|
||||
expected := `<p>Test</p>Hello World!`
|
||||
output := Rewriter("https://example.org/article", content, `remove_tables`)
|
||||
|
||||
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