mwilliamson / python-mammoth

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

Underlines and Header note #19

Closed GitBruno closed 8 years ago

GitBruno commented 8 years ago

The README states that underlines are supported. But if I add an underline in Word via the underline button it does not transfer over to HTML. Also H1 to H4 is working but H5 and H6 dropping out. Again, the README states this is implemented.

mwilliamson commented 8 years ago

Since underline is usually used to indicate a link on the web, Mammoth ignores underlining by default. You can use a style mapping to describe how underlines should be handled.

You can also use a style mapping to control how your headings are mapped. Having said that, if Word has headings down to "Heading 6" by default, then I'll happily add them to the default style map.

GitBruno commented 8 years ago

OK cool. Agree with the underlines! For the headings, word goes all the way to header 9 but HTML only supports to H6, so I think it will be nice to add H5 and H6. I'll create a pull request today.

mwilliamson commented 8 years ago

Handled by #21.