fix first replacement being used everywhere when processing inline images
This commit is contained in:
parent
732a4c79bf
commit
b6054ed6bb
@ -232,9 +232,10 @@ class DividerDrawer(object):
|
|||||||
fontsize_multiplier,
|
fontsize_multiplier,
|
||||||
height_percent,
|
height_percent,
|
||||||
text_fontsize_multiplier=None):
|
text_fontsize_multiplier=None):
|
||||||
replace = '<img src="{fpath}" width={width} height="{height_percent}%" valign="middle" /> '
|
replace_template = '<img src="{fpath}" width={width} height="{height_percent}%" valign="middle" /> '
|
||||||
offset = 0
|
offset = 0
|
||||||
for match in re.finditer(tag_pattern, text):
|
for match in re.finditer(tag_pattern, text):
|
||||||
|
replace = replace_template
|
||||||
tag = match.group(0)
|
tag = match.group(0)
|
||||||
fname = re.sub(tag_pattern, fname_replace, tag)
|
fname = re.sub(tag_pattern, fname_replace, tag)
|
||||||
if text_fontsize_multiplier is not None:
|
if text_fontsize_multiplier is not None:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user