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

JSON value 'thin' of type NSString cannot be converted to NSNumber #470

Closed
msageryd opened this issue Mar 23, 2021 · 5 comments
Closed

JSON value 'thin' of type NSString cannot be converted to NSNumber #470

msageryd opened this issue Mar 23, 2021 · 5 comments
Labels
bug Crush'em all.

Comments

@msageryd
Copy link

I'm using react-native-render-html for rendering email bodies.

When I get the following in the html i get "JSON value 'thin' of type NSString cannot be converted to NSNumber".

    <blockquote type=\"cite\" style=\"border-left-color: grey; border-left-width: thin; border-left-style: solid; margin: 5px 5px;padding-left: 10px;\">

I suppose this is just a dev-warning, because it's dismissable. But I also suppose that the "thin" border will be omitted.

Is this the way the librart shows me that an attribute is not supported?
No biggie, since it renders anyway, but maybe there is room for improvement.

@msageryd msageryd added the bug Crush'em all. label Mar 23, 2021
@jsamr
Copy link
Collaborator

jsamr commented Mar 23, 2021

@msageryd I suppose you're using version 5.1.0. This issue is already addressed in v6.x with the separation of CSS parsing in a new package, @native-html/css-processor. The v6 is still in alpha. See #430

@jsamr jsamr closed this as completed Mar 23, 2021
@msageryd
Copy link
Author

Thanks!
Thats great news. I'm already thrilled about finding this library. It solves so many problems for me.

Thank you for your work!

@castalonirenz
Copy link

castalonirenz commented May 11, 2021

Still having issue with the line-height: 107%. usiing the foundry version

image

@jsamr
Copy link
Collaborator

jsamr commented May 11, 2021

@castalonirenz Good catch; that's an edge case since usually percent sizes are translatable in React Native sizes. I'll have a look.

@jsamr
Copy link
Collaborator

jsamr commented May 12, 2021

@castalonirenz The issue has been fixed in the latest css-processor release https://github.com/native-html/core/releases/tag/%40native-html/css-processor%401.8.1. You can explicitly install it, or wait for the react-native-render-html@6.0.0-alpha-25 which should be released within a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Crush'em all.
Projects
None yet
Development

No branches or pull requests

3 participants