Make HTMLLinkTests pass.

This commit is contained in:
Brent Simmons
2024-09-22 11:33:37 -07:00
parent a7c4669bd6
commit c348ec41b6
4 changed files with 34 additions and 41 deletions

View File

@@ -56,7 +56,7 @@ extension HTMLLinkParser: SAXHTMLParserDelegate {
private func urlString(with attributesDictionary: SAXHTMLParser.HTMLAttributesDictionary) -> String? {
guard let href = attributesDictionary.object(forCaseInsensitiveKey: HTMLAttributeName.href) else {
guard let href = attributesDictionary.object(forCaseInsensitiveKey: HTMLAttributeName.href), !href.isEmpty else {
return nil
}