Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<br> doesn't work as expected #2

Open
mokabyls opened this issue Mar 30, 2018 · 1 comment
Open

<br> doesn't work as expected #2

mokabyls opened this issue Mar 30, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mokabyls
Copy link

Hi,

first at all, thank you for this library !

Expected behaviour

Using this HTML, I'm expected to see a new line after "in html" and before "hi".
<p>My awesome text <strong>in html</strong><br>hi</p>

Actual behaviour

Actually, br tag parsed by the library but didn't create new line if it is contain in an another tag.
I checked your example and the same problem seem to appear.

Code sample, screenshots

working

not-working

What have you tried

In text-renderer.js in render's method, i just add the following code and it worked:
if (tagName == 'br') { return (<Text>{"\n"}</Text>) }
But i don't think it's the right way to do that. Any idea ?

@usrbowe usrbowe self-assigned this Apr 2, 2018
@usrbowe usrbowe added the bug Something isn't working label Apr 2, 2018
@usrbowe usrbowe assigned Minh0001 and unassigned usrbowe Apr 28, 2018
@usrbowe
Copy link
Contributor

usrbowe commented May 1, 2018

@Minh0001 can u create a PR for this, thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants