You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
358 B

class DocxProcessor:
def __init__(self):
self.current_img_idx = 0
def replacer(self, match):
if self.current_img_idx < len(self.listImage):
result = f'<img src="./Images/{self.listImage[self.current_img_idx]}">'
self.current_img_idx += 1
return result
return match.group()