Add tests to patcher

This commit is contained in:
Dolan Miu
2023-03-16 01:55:18 +00:00
parent 262f6323d0
commit 7e9884081e
11 changed files with 447 additions and 81 deletions

View File

@ -25,7 +25,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,