inokawa / remark-docx

remark plugin to compile markdown to docx (Microsoft Word, Office Open XML).
https://inokawa.github.io/remark-docx/
MIT License
34 stars 12 forks source link

Fix ESM-CJS compatibility (#36) #37

Closed zetlen closed 1 year ago

zetlen commented 1 year ago

Resolves #36.

zetlen commented 1 year ago

Added a fix for an unexpected regression.

It looks like version 8.1.0 of docx has a regression where it'll return a Uint8Array instead of a Buffer if it can't tell it's running in Node. The intended behavior is documented here. I'll open the bug in docx when I can. I don't have the time to make a minimal repro for that, unfortunately.

zetlen commented 1 year ago

Whoops, forgot to actually update the snapshots! Stand by