onizet / html2openxml

Html2OpenXml is a small .Net library that convert simple or advanced HTML to plain OpenXml components. This program has started in 2009, initially to convert user's comments into templated Word.
MIT License
321 stars 109 forks source link

Trim trailing <br /> #28

Closed Gidmark closed 6 years ago

Gidmark commented 6 years ago

Could there be an option in the converter where you could trim trailing
s inside a paragraph? To skip unnecessary breaklines.

onizet commented 6 years ago

Hello,

I don't alter the original HTML : I mean if the html contains 3 consecutive <br/>, it means you want 3 line breaks. If you want to alter the original source, you can use a package like HtmlAgilityPack