nathell / clj-tagsoup

A HTML parser for Clojure.
Other
181 stars 22 forks source link

input-stream not returning a map for file URL #4

Closed rossabaker closed 12 years ago

rossabaker commented 12 years ago

input-stream on a file URL is returning the stream, instead of a map with a :stream key like the other methods.

Before:

pl.danieljanus.tagsoup> (input-stream (clojure.java.io/resource "scores.html"))
#<FileInputStream java.io.FileInputStream@5ce345c2>

After:

pl.danieljanus.tagsoup> (input-stream (clojure.java.io/resource "scores.html"))
{:stream #<FileInputStream java.io.FileInputStream@26ffd553>}

Fixed by delegating to the File method, so a file URL is always treated like a File.

nathell commented 12 years ago

Thanks for the contribution! I'll release 0.2.7 with this change.