You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem: #203 introduced a bug that results in nested paragraphs.
The solution:
We will need to build a method similar to pydocx.export.base:PyDocXExporter._convert_complex_fields_into_simple_fields. The complex fields to simple fieds (cf2sf) method was built to handle complex hyperlinks. So it's possible to build a hyperlink in OOXML that spans multiple run tags. However, it was not possible to roll all of that into the original hyperlink with using some sort of lookahead. The solution for the nested paragraphs is going to be very similar I think. Basically, when we find an mce:AlternateContent tag, we need to close whatever paragraph (maybe others as well) is holding the mce:AlternateContent Then open a new paragraph (maybe others as well) after the mce:AlternateContent tag has been finished.
The problem:
#203 introduced a bug that results in nested paragraphs.
The solution:
We will need to build a method similar to
pydocx.export.base:PyDocXExporter._convert_complex_fields_into_simple_fields
. The complex fields to simple fieds (cf2sf) method was built to handle complex hyperlinks. So it's possible to build a hyperlink in OOXML that spans multiple run tags. However, it was not possible to roll all of that into the original hyperlink with using some sort of lookahead. The solution for the nested paragraphs is going to be very similar I think. Basically, when we find anmce:AlternateContent
tag, we need to close whatever paragraph (maybe others as well) is holding themce:AlternateContent
Then open a new paragraph (maybe others as well) after themce:AlternateContent
tag has been finished.For example:
Lets say the XML looks like this.
We will want it to end up looking like this:
Which would convert the output from:
to:
The text was updated successfully, but these errors were encountered: