mirror of
https://github.com/miniflux/v2.git
synced 2025-08-06 17:41:00 +00:00
refactor(readability): minor clean up
Remove a now-useless regex and its associated test.
This commit is contained in:
parent
766d4ab834
commit
69a74c4abf
2 changed files with 1 additions and 152 deletions
|
@ -7,7 +7,6 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"log/slog"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"miniflux.app/v2/internal/urllib"
|
||||
|
@ -16,13 +15,9 @@ import (
|
|||
"golang.org/x/net/html"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultTagsToScore = "section,h2,h3,h4,h5,h6,p,td,pre,div"
|
||||
)
|
||||
const defaultTagsToScore = "section,h2,h3,h4,h5,h6,p,td,pre,div"
|
||||
|
||||
var (
|
||||
divToPElementsRegexp = regexp.MustCompile(`(?i)<(?:a|blockquote|dl|div|img|ol|p|pre|table|ul)[ />]`)
|
||||
|
||||
strongCandidates = [...]string{"popupbody", "-ad", "g-plus"}
|
||||
maybeCandidate = [...]string{"and", "article", "body", "column", "main", "shadow"}
|
||||
unlikelyCandidate = [...]string{"banner", "breadcrumbs", "combx", "comment", "community", "cover-wrap", "disqus", "extra", "foot", "header", "legends", "menu", "modal", "related", "remark", "replies", "rss", "shoutbox", "sidebar", "skyscraper", "social", "sponsor", "supplemental", "ad-break", "agegate", "pagination", "pager", "popup", "yom-remote"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue