karnov / htmltoword

Ruby html to word gem
MIT License
179 stars 71 forks source link

Spaces removed #46

Open GeorgesLeYeti opened 8 years ago

GeorgesLeYeti commented 8 years ago

Hi,

I'm having an issue when i try to convert my html. For example: <show><test>Hello``</test><test><strong>World</strong>``</test><test>RoR!</test></show> The HTML is:

Hello World RoR!

There is a space between World and RoR!

But the result in Docx is:

Hello WorldRoR!

Of course strong tag is juste 1 case same isue with , etc...

GeorgesLeYeti commented 8 years ago

Which is the goal of the line 75 in htmltoword/lib/htmltoword/document.rb

source = Nokogiri::HTML(html.gsub(/>\s+</, '><'))

Badikov commented 8 years ago

&nbsp;

lukelex commented 6 years ago

@GeorgesLeYeti is this still an issue?