cezheng / Fuzi

A fast & lightweight XML & HTML parser in Swift with XPath & CSS support
MIT License
1.07k stars 156 forks source link

isHTML returns false for HTML nodes #95

Closed laurent-humbert closed 5 years ago

laurent-humbert commented 5 years ago
    let html2 = "<html><head></head><body>SOME TEXT</body></html>"
    let doc2 = try? HTMLDocument(string: html2)!
    theBody2 = doc2.body
    print("isHTML", theBody2.isHTML)

   this prints "FALSE"

  then rawXML calls xmlNodeDump instead of htmlNodeDump which in my case is bad.

Environment

How to reproduce:

cezheng commented 5 years ago

Thanks for filing the issue. This bug is fixed in 2.2.1 for Swift 4.2 and 3.0.0 for Swift 5.0.

laurent-humbert commented 5 years ago

Outstanding. Thank you!