rtf icon indicating copy to clipboard operation
rtf copied to clipboard

HTML Converter - Space Between Nodes

Open iamvery opened this issue 13 years ago • 1 comments

What if I'd like to have spaces between HTML nodes? Like, when using formatting HTML tags.

Say you have HTML as such:

<p>This is a <em>test</em>.</p>

This would be rendered as:

This is atest.

I cannot come up with any way to allow space between nodes at all! All text is stripped of leading/trailing space. Ideas?


This is copied from https://github.com/thechrisoshow/rtf/commit/b3d57cca528d1120fbc42c45c19b5b1487b312d1#commitcomment-1460132

iamvery avatar Jun 14 '12 20:06 iamvery

Worked up a fix for my particular case https://github.com/iamvery/rtf/commit/38d80ed425033e77d2ebc67843e5e02e2ac62a9b

Still having issues with things like:

<p><strong>abc </strong><em>123</em></p>

Render something like "abc123" instead of "abc 123"

iamvery avatar Jun 14 '12 21:06 iamvery