Commit Graph

7 Commits

Author SHA1 Message Date
2d2e4cdab2 fix: Missing text property for patchDocument (#2760)
* fix: Missing text property

Ignore <br /> for patched files

* Fix spelling issues
2024-10-13 01:29:32 +01:00
13cf3eee5a Feature/multiple patch document exports (#2497)
* Turn patch document into options object

Add outputType to options

* Set keep styles to true by default

* Simplify method

* Rename variable

* #2267 Multiple patches of same key

* Remove path which won't be visited
2023-12-31 23:16:48 +00:00
a89ee463e6 Fix style being missed on patchDocument
There were scenarios in which patching a document would result in loss
of style for the template runs and, possibly, their right-adjacent run
as well (post-splitting). That was due to the run style elements not
being added to the newly created runs.

This commit addresses this issue by introducing a new, optional, flag
for the `patchDocument` function: `keepOriginalStyles`. It defaults to
`false` (current behavior) and, when `true`, ensures that there is no
loss of styling.

This should address https://github.com/dolanmiu/docx/issues/2293.
2023-10-18 12:58:01 -03:00
09ab91eeef Fix tests and build
Remove unused code and dependencies
2023-06-08 13:30:31 +01:00
e69b063687 Porting tests over to vitest 2023-06-05 00:33:43 +01:00
7e9884081e Add tests to patcher 2023-03-16 01:55:18 +00:00
811dd61562 Add tests 2023-03-15 02:46:39 +00:00