Detect <svg:image as cover image

This commit is contained in:
Las Zenow 2013-07-18 20:28:35 +02:00
parent d1d9970427
commit 6130ffe7b7

View file

@ -70,7 +70,7 @@ func GetCover(e *epubgo.Epub, title string) (bson.ObjectId, bson.ObjectId) {
} }
/* search for img on the text */ /* search for img on the text */
exp, _ := regexp.Compile("<ima?g.*[(src)(href)]=[\"']([^\"']*(\\.[^\\.\"']*))[\"']") exp, _ := regexp.Compile("<.*ima?g.*[(src)(href)]=[\"']([^\"']*(\\.[^\\.\"']*))[\"']")
it, errNext := e.Spine() it, errNext := e.Spine()
for errNext == nil { for errNext == nil {
file, err := it.Open() file, err := it.Open()