Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Caption has to be found earlier
  • Loading branch information
kthoden committed Mar 29, 2019
1 parent 972e52d commit 21fcfa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imxml2epub.py
Expand Up @@ -519,6 +519,7 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber):
contentopf = addToContentopf(contentopf, content_opf_filename, content_opf_fileid, extension_and_mime)

idFigure = xmlFigure.find(".//anchor").get("id")
xmlFigureCaption = xmlFigure.find(".//caption")
intFigureNumber = dictFigures[idFigure]
if xmlFigure.tag == "EOAfigure":
strImageWidth = xmlFigure.find(".//width").text
Expand All @@ -536,7 +537,6 @@ def addToTocncx(tocncx, Label, intTechnicalChapterNumber):
if args.nocaption:
pass
else:
xmlFigureCaption = xmlFigure.find(".//caption")
xmlFigureCaption.tag = "p"
strFigureCaption = xmlFigureCaption.text or ""
# FIX
Expand Down

0 comments on commit 21fcfa2

Please sign in to comment.