Detect image tags for cover
This commit is contained in:
parent
efbd3b3c09
commit
f89416fbf6
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ func getCover(e *epub.Epub, title string) (string, string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* search for img on the text */
|
/* search for img on the text */
|
||||||
exp, _ := regexp.Compile("<img.*src=[\"']([^\"']*(\\.[^\\.\"']*))[\"']")
|
exp, _ := regexp.Compile("<ima?g.*[(src)(href)]=[\"']([^\"']*(\\.[^\\.\"']*))[\"']")
|
||||||
it := e.Iterator(epub.EITERATOR_SPINE)
|
it := e.Iterator(epub.EITERATOR_SPINE)
|
||||||
defer it.Close()
|
defer it.Close()
|
||||||
var err error = nil
|
var err error = nil
|
||||||
|
|
Reference in a new issue