Bridgy Publish to Facebook of "notes" should preserve whitespace formatting especially line-breaks #446

Closed
tantek opened this Issue Aug 20, 2015 · 6 comments

Comments

Projects
None yet
2 participants
@tantek
Contributor

tantek commented Aug 20, 2015

Currently if you use Bridgy Publish to POSSE a note from your personal site to your FB, it will do so with all whitespace collapsed.

On the contrary, when Twitter cross-posts to Facebook, it preserves any/all whitespace in the tweet.

When I use Bridgy Publish, I have to go in and manually edit the FB POSSE copy that Bridgy created, and add back in line breaks for example (original: http://tantek.com/2015/232/t1/eat-without-digital-devices and edited FB copy: https://www.facebook.com/tantek.celik/posts/10101843869452633 )

It would be great if Bridgy Publish would preserve whitespace from a note post to the FB post (e.g. especially returns / blank lines).

http://indiewebcamp.com/note#Indieweb_whitespace_thinking

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Aug 20, 2015

Owner

thanks for the detailed request! looks like the root cause is that we use html2text to render whitespace (#291), which expects that only html tags are used to create meaningful whitespace, not newline or space chars due to e.g. CSS white-space: pre* or the recommendation for note post types.

we're now discussing the intricacies of this in practice - how many real world implementations comply, how to handle comparing with other fields, etc.

Owner

snarfed commented Aug 20, 2015

thanks for the detailed request! looks like the root cause is that we use html2text to render whitespace (#291), which expects that only html tags are used to create meaningful whitespace, not newline or space chars due to e.g. CSS white-space: pre* or the recommendation for note post types.

we're now discussing the intricacies of this in practice - how many real world implementations comply, how to handle comparing with other fields, etc.

@snarfed snarfed added the publish label Aug 20, 2015

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Aug 20, 2015

Owner

current proposal is this heuristic: whitespace is meaningful in notes (maybe all h-entries?) if they don't contain <p> or <br> elements.

e.g. my own notes on https://snarfed.org/ pretty much all contain meaningless whitespace, but they also all contain <p>s, so it'd work for me.

Owner

snarfed commented Aug 20, 2015

current proposal is this heuristic: whitespace is meaningful in notes (maybe all h-entries?) if they don't contain <p> or <br> elements.

e.g. my own notes on https://snarfed.org/ pretty much all contain meaningless whitespace, but they also all contain <p>s, so it'd work for me.

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Aug 30, 2015

Owner

current status: trying to understand how to store both HTML and plain text content in ActivityStreams (either 1.0 or 2.0). i've tried to wade through the 2.0 specs a couple times now, and i ended up glazing both times. 😆 😭

http://www.w3.org/TR/activitystreams-vocabulary/#dfn-content-term
http://www.w3.org/TR/activitystreams-core/#naturalLanguageValues

Owner

snarfed commented Aug 30, 2015

current status: trying to understand how to store both HTML and plain text content in ActivityStreams (either 1.0 or 2.0). i've tried to wade through the 2.0 specs a couple times now, and i ended up glazing both times. 😆 😭

http://www.w3.org/TR/activitystreams-vocabulary/#dfn-content-term
http://www.w3.org/TR/activitystreams-core/#naturalLanguageValues

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Sep 18, 2015

Owner

we settled on p-content vs e-content: http://indiewebcamp.com/note#Indieweb_whitespace_thinking

...which is what bridgy publish currently does, so I'm tentatively closing this. feel free to reopen if you disagree!

Owner

snarfed commented Sep 18, 2015

we settled on p-content vs e-content: http://indiewebcamp.com/note#Indieweb_whitespace_thinking

...which is what bridgy publish currently does, so I'm tentatively closing this. feel free to reopen if you disagree!

@snarfed snarfed closed this Sep 18, 2015

@tantek

This comment has been minimized.

Show comment
Hide comment
@tantek

tantek Sep 18, 2015

Contributor

Thank you for raising:
"a better proposal (imho): interpret whitespace as meaningful in p-content but not in e-content."
really appreciate it - took us a while to get through the details but this ended up working well!

Contributor

tantek commented Sep 18, 2015

Thank you for raising:
"a better proposal (imho): interpret whitespace as meaningful in p-content but not in e-content."
really appreciate it - took us a while to get through the details but this ended up working well!

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