Detect image tags for cover

This commit is contained in:
Las Zenow 2012-08-25 22:02:40 +02:00
parent efbd3b3c09
commit f89416fbf6

View file

@ -108,7 +108,7 @@ func getCover(e *epub.Epub, title string) (string, string) {
}
/* search for img on the text */
exp, _ := regexp.Compile("<img.*src=[\"']([^\"']*(\\.[^\\.\"']*))[\"']")
exp, _ := regexp.Compile("<ima?g.*[(src)(href)]=[\"']([^\"']*(\\.[^\\.\"']*))[\"']")
it := e.Iterator(epub.EITERATOR_SPINE)
defer it.Close()
var err error = nil