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

Already on GitHub? Sign in to your account

style values being ignored if there's trailing whitespace #252

Closed
dmeatte opened this Issue Dec 14, 2012 · 0 comments

Comments

Projects
None yet
2 participants

dmeatte commented Dec 14, 2012

If I convert html with a style like ".c2 { font-family: 'Trebuchet MS'; font-size: 16px; font-style: italic }" to an ns attributed string, the space after italic isn't trimmed off. This causes DHTMLElement's applyStyleDictionary: to miss the attribute since it doesn't trim the trailing whitespace off before it compares it to it's string constants.

I fixed this by adding a string trim to the value in scanCSSAttribute:value: inside NSScanner+HTML.m

odrobnik added a commit that referenced this issue Dec 20, 2012

Added unit test for #252
To DO: Modify NSScanner+HTML to properly de-quote the font and remove the whitespace on italic

@odrobnik odrobnik closed this in 8c84707 Dec 22, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment