mwilliamson / python-mammoth

Convert Word documents (.docx files) to HTML
BSD 2-Clause "Simplified" License
785 stars 121 forks source link

All the keys are bold after conversion #104

Closed mosihe closed 3 years ago

mosihe commented 3 years ago

docx demo: YouTube aaa YouTube aaa html : YouTube aaa YouTube aaa I use Python 3.8.5 and Mammoth-1.4.16 on windows 10.

mwilliamson commented 3 years ago

Could you provide a minimal example document, the actual HTML produced, and the expected HTML?

mosihe commented 3 years ago

Could you provide a minimal example document, the actual HTML produced, and the expected HTML? ok. And now I found something unusual.
test-demo.zip image

mwilliamson commented 3 years ago

It looks like you've applied the character style "Strong" to the second "YouTube", which Mammoth is converting to a strong tag. If you remove that character style, then you should see the HTML you expect.

mwilliamson commented 3 years ago

Closing since it looks like Mammoth's working as intended.