mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 04:24:45 +00:00
Use inline_fmt everywhere
Signed-off-by: SimJeg <sjegou@nvidia.com>
This commit is contained in:
parent
61bd559f78
commit
895cedb9ab
@ -450,11 +450,11 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend):
|
||||
"Quote",
|
||||
]:
|
||||
level = self.get_level()
|
||||
parent = doc.add_group(label=GroupLabel.INLINE, parent=self.parents[level - 1])
|
||||
inline_fmt = doc.add_group(label=GroupLabel.INLINE, parent=self.parents[level - 1])
|
||||
for text, format, hyperlink in paragraph_elements:
|
||||
doc.add_text(
|
||||
label=DocItemLabel.PARAGRAPH,
|
||||
parent=parent,
|
||||
parent=inline_fmt,
|
||||
text=text,
|
||||
formatting=format,
|
||||
hyperlink=hyperlink,
|
||||
@ -464,11 +464,11 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend):
|
||||
# Text style names can, and will have, not only default values but user values too
|
||||
# hence we treat all other labels as pure text
|
||||
level = self.get_level()
|
||||
parent = doc.add_group(label=GroupLabel.INLINE, parent=self.parents[level - 1])
|
||||
inline_fmt = doc.add_group(label=GroupLabel.INLINE, parent=self.parents[level - 1])
|
||||
for text, format, hyperlink in paragraph_elements:
|
||||
doc.add_text(
|
||||
label=DocItemLabel.PARAGRAPH,
|
||||
parent=parent,
|
||||
parent=inline_fmt,
|
||||
text=text,
|
||||
formatting=format,
|
||||
hyperlink=hyperlink,
|
||||
|
Loading…
Reference in New Issue
Block a user