microsoft / Simplify-Docx

Simplify DOCX files to JSON
MIT License
219 stars 46 forks source link

Error when setting flatten-hyperlink False #31

Open tom-clarke-dluhc opened 10 months ago

tom-clarke-dluhc commented 10 months ago

Error: 'CT_Hyperlink' object has no attribute 'docLocatoin' when setting simplify(doc, {"flatten-hyperlink":False}). Is it due to this typo? https://github.com/microsoft/Simplify-Docx/blob/7f41e9195f5eb9e40558d57dc41f325f92a1b3a7/src/simplify_docx/elements/paragraph.py#L188

jdthorpe commented 7 months ago

Almost certainly due to the typo you mentioned. I'll fix that when I get a chance (probably next day or so). (Incidentally, I've never been part of the MS Office group at Microsoft. Just needed a parser a few years ago and none of the available ones worked for me -- so I built this one and shared it out and maintain in what little free time I have...)

tom-clarke-dluhc commented 7 months ago

Thanks Jason. Definitely no rush to fix and I appreciate you creating it and maintaining it!