fix(word): harden DOCX preprocessing and temp-file cleanup

- Make the HTML preprocessor code-block and inline-code aware so code

  examples containing <style> / <div> / comments are preserved.

- Strip all raw <div> tags (not just alignment attributes) to avoid

  malformed output from unmatched closing tags.

- Handle uppercase tags and single/unquoted attributes.

- Create temporary DOCX input files inside private mkdtemp directories

  instead of predictable names in the shared temp directory.

- Wrap batch DOCX preprocessing in try/catch so one unreadable file

  does not abort the entire batch.

- Add regression tests for the edge cases above.
This commit is contained in:
2026-06-30 19:57:40 +05:30
parent 94906a068a
commit 2cac075c0e
3 changed files with 98 additions and 15 deletions
Binary file not shown.