Merge pull request #142 from nickgashkov/fix/vmerge-w-t-attributes
Fix vertical merge tag for table cells with XML attributes
This commit is contained in:
commit
0c02520b6d
@ -103,7 +103,7 @@ class DocxTemplate(object):
|
|||||||
m1.group(4) # ``</w:t>``.
|
m1.group(4) # ``</w:t>``.
|
||||||
)
|
)
|
||||||
return re.sub(
|
return re.sub(
|
||||||
r'(</w:tcPr>.*?<w:t>)(.*?)(?:{%\s*vm\s*%})(.*?)(</w:t>)',
|
r'(</w:tcPr[ >].*?<w:t(?:.*?)>)(.*?)(?:{%\s*vm\s*%})(.*?)(</w:t>)',
|
||||||
vMerge,
|
vMerge,
|
||||||
m.group(), # Everything between ``</w:tc>`` and ``</w:tc>`` with ``{% vm %}`` inside.
|
m.group(), # Everything between ``</w:tc>`` and ``</w:tc>`` with ``{% vm %}`` inside.
|
||||||
flags=re.DOTALL,
|
flags=re.DOTALL,
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user