diff --git a/Modules/FeedFinder/Sources/FeedFinder/HTMLFeedFinder.swift b/Modules/FeedFinder/Sources/FeedFinder/HTMLFeedFinder.swift
index 980a23d7b..4d3363060 100644
--- a/Modules/FeedFinder/Sources/FeedFinder/HTMLFeedFinder.swift
+++ b/Modules/FeedFinder/Sources/FeedFinder/HTMLFeedFinder.swift
@@ -20,7 +20,7 @@ final class HTMLFeedFinder {
private var feedSpecifiersDictionary = [String: FeedSpecifier]()
init(parserData: ParserData) {
- let metadata = RSHTMLMetadataParser.htmlMetadata(with: parserData)
+ let metadata = HTMLMetadataParser.htmlMetadata(with: parserData)
var orderFound = 0
for oneFeedLink in metadata.feedLinks {
@@ -31,7 +31,7 @@ final class HTMLFeedFinder {
}
}
- let bodyLinks = RSHTMLLinkParser.htmlLinks(with: parserData)
+ let bodyLinks = HTMLLinkParser.htmlLinks(with: parserData)
for oneBodyLink in bodyLinks {
if linkMightBeFeed(oneBodyLink), let normalizedURL = oneBodyLink.urlString?.normalizedURL {
orderFound += 1
@@ -68,7 +68,7 @@ private extension HTMLFeedFinder {
return false
}
- func linkMightBeFeed(_ link: RSHTMLLink) -> Bool {
+ func linkMightBeFeed(_ link: HTMLLink) -> Bool {
if let linkURLString = link.urlString, urlStringMightBeFeed(linkURLString) {
return true
}
diff --git a/Modules/RSParser/Tests/RSParserTests/HTMLLinkPerformanceTests.swift b/Modules/RSParser/Tests/RSParserTests/HTMLLinkPerformanceTests.swift
index e9324c4fd..be6776295 100644
--- a/Modules/RSParser/Tests/RSParserTests/HTMLLinkPerformanceTests.swift
+++ b/Modules/RSParser/Tests/RSParserTests/HTMLLinkPerformanceTests.swift
@@ -17,7 +17,7 @@ final class HTMLLinkPerformanceTests: XCTestCase {
// 0.003 sec on my 2012 iMac
let d = parserData("sixcolors", "html", "http://sixcolors.com/")
self.measure {
- _ = RSHTMLLinkParser.htmlLinks(with: d)
+ _ = HTMLLinkParser.htmlLinks(with: d)
}
}
}
diff --git a/Modules/RSParser/Tests/RSParserTests/HTMLLinkTests.swift b/Modules/RSParser/Tests/RSParserTests/HTMLLinkTests.swift
index cd56a7113..493209074 100644
--- a/Modules/RSParser/Tests/RSParserTests/HTMLLinkTests.swift
+++ b/Modules/RSParser/Tests/RSParserTests/HTMLLinkTests.swift
@@ -15,7 +15,7 @@ import RSParserObjC
@Test func sixColorsLink() {
let d = parserData("sixcolors", "html", "http://sixcolors.com/")
- let links = RSHTMLLinkParser.htmlLinks(with: d)
+ let links = HTMLLinkParser.htmlLinks(with: d)
let linkToFind = "https://www.theincomparable.com/theincomparable/290/index.php"
let textToFind = "this week’s episode of The Incomparable"
@@ -30,4 +30,120 @@ import RSParserObjC
#expect(found)
#expect(links.count == 131)
}
+
+ // MARK: - Inline fixture tests
+
+ @Test func linksInsideScriptAreIgnored() {
+ // The scanner enters raw-text mode for
+ real 2
+