ruby-docx / docx

a ruby library/gem for interacting with .docx files
MIT License
431 stars 170 forks source link

to_html only considers some styles and not others #126

Closed sixtyfive closed 8 months ago

sixtyfive commented 2 years ago

Not sure if this should be a bug report or a feature request. In any case, if there is an existing Issue for this, please just close, but I couldn't find one after searching for a while.

With a docx test file that includes the following styles applied to different words:

... and then converted to HTML by .paragraphs.first.to_html, I get the following styles back out:

So color:red and <s> are missing.

Is that something where every style has to be explicitly implemented or should this be working? If it's the former I'd like to give it a shot to implement it if there could be a little bit of guidance as to what places of the code to look at?

supraja-trd commented 10 months ago

Hi @satoryu , the above is fixed in my PR : https://github.com/ruby-docx/docx/pull/144 . Kindly review it and let me know further updates.