-
Notifications
You must be signed in to change notification settings - Fork 57
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
“white-space: pre” prevents words from wrapping in tweet bodies #456
Comments
Hmm! Do you mean that Reeder doesn't wrap it, so it gets truncated? Does it not let you scroll horizontally to see the rest? That's surprising if so. I looked at it in a few other similar renderings:
|
(Oh, and yes, the reason for |
This is how it looks in Reeder on iPadOS: A separate UI decision in that app means that trying to scroll to the right will instead slide in a web view showing the Twitter page. I agree that this is user agent–specific… in the Feedbin web interface in Firefox, the text is wrapped normally. Reeder’s behavior of preserving all of the white space does seem correct to me, in some by-the-book sense, but if this works okay basically everywhere else then I’m fine closing this ticket 🙂 |
That being said, most of the articles in the feed omit the |
Good question! I also looked more deeply, and we actually had this problem in Atom a while ago and fixed it in 0ac5436, but didn't apply the same fix to JSON Feed, which we admittedly pay less attention to. I'll do it there too! |
^ deployed this fix, @bdesham feel free to try! |
It looks like Feedbin is caching the older version of the post, so I can’t test this in Reeder itself, but the JSON Feed looks great now! Thanks so much 🎉 |
I use Granary to generate a JSON Feed for the Twitter account of the Buffalo office of the National Weather Service. This tweet is rendered poorly in Reeder for Mac and iOS: all of the text is put onto one line. This happens because the line has the rule
white-space: pre
applied, as you can see in thecontent_html
in the JSON Feed entry:I’m guessing that this style is applied as a result of there being multiple images; other tweets in the feed that have just one image don’t show this rendering problem. In this particular case the desirable thing would be to replace the newline after “see:” with a
<br>
tag, and to get rid of thewhite-space: pre
, but I know that Twitter and HTML have different ideas of which whitespace should be preserved and I assume this is a way of getting the former’s rules in the latter’s context.The text was updated successfully, but these errors were encountered: