fix: Missing text property for patchDocument (#2760)

* fix: Missing text property

Ignore <br /> for patched files

* Fix spelling issues
This commit is contained in:
Dolan
2024-10-13 01:29:32 +01:00
committed by GitHub
parent 0cadec7f58
commit 2d2e4cdab2
7 changed files with 751 additions and 2 deletions

View File

@ -29,7 +29,7 @@ export const splitRunElement = (runElement: Element, token: string): { readonly
runElement.elements
?.map((e, i) => {
if (e.type === "element" && e.name === "w:t") {
const text = (e.elements?.[0].text as string) ?? "";
const text = (e.elements?.[0]?.text as string) ?? "";
const splitText = text.split(token);
const newElements = splitText.map((t) => ({
...e,