-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Feature request: Support for formatted post display #1459
Comments
Apparently there is some support for formatting; I'm seeing crossed out text in a port that doesn't have any formatting - https://mastodon.social/@glyph/110724377873612649 |
This is a bug, IceCubesApp should not interpret markdown by itself. If the user has set that they are posting Markdown or HTML (it is a setting in So, if IceCubesApp retrieves a toot-text from Mastodon-server, it should not do any additional parsing/interpreting. It should just support the display of HTML in the post-view. |
How can I distinguish whether the crossed-out text is something Ice Cubes added by interpreting the plain text or something Ice Cubes displayed from the HTML? |
If you see it in IceCubesApp, then it means it is how it should be shown, no further interpretation. Interpretation and conversion from Markdown to HTML is only done on the server. If the server returns a ˜text˜ then the tilde-symbols are to be shown and not interpreted in the client (note: I am using the "special" ˜ to avoid GitHub interpreting it). So, rule:
|
ATM Ice Cubes strip HTML for rendering. There is indeed a new set of allowed tag for bold etc... planning to support it once it's a bit more mainstream. |
Yeah, that's what I thought. Thank you for your great work. Just a heads-up: because of some (let's call them) "discussions" in Fediverse regarding Mastodon and where it might be heading, large instances are slowly switching to This means that, hopefully, |
So, if Ice Cubes retrieves the post and either displays plain text as-is or strips tags from HTML, how does crossed-out text ever appear? In particular, how does that happen in https://mastodon.social/@glyph/110720782356844143 ? |
It's a bug in Ice Cubes. Because of the UI framework the app is using, SwiftUI, the easiest way to render HTML text is to use the native Markdown renderer. So HTML is stripped, then it's converted to Markdown for final display. Some characters combinaison are interpreted as Markdown unfortunately and rendered as such. |
Ok. Is there an issue for that bug (that I can subscribe to), or does it belong in this feature request? |
This one sound nice :) |
Seen again in https://mastodon.social/@taylorlorenz/110742042969323601 |
While SwiftUI's `Text` view won't display these in an `AttributedString` even if they get parsed from Markdown (which would also require the use of the `.full` option instead of the `.inlineOnlyPresrevingWhitespace` option), we can improve the appearance somewhat. Currently, list elements are clumped together with no spaces between them, and there's no indication whatsoever that the author indicated these to be a list. Change to insert Markdown list syntax with linebreaks and dashes, so users can at least understand there's a list there. Similar change for ordered lists. This will still be broken for nested lists, but it didn't seem worth it to put a lot of effort into this (or other revamps, like making bold/italics/code work properly) because it seems like the current text handling in Ice Cubes is suboptimal and eventually slated for improvement (according to Dimillian#1459 (comment)). So this is more designed to make lists "less broken" in some cases, rather than be a comprehensive fix for all lists in all cases.
While SwiftUI's `Text` view won't display these in an `AttributedString` even if they get parsed from Markdown (which would also require the use of the `.full` option instead of the `.inlineOnlyPresrevingWhitespace` option), we can improve the appearance somewhat. Currently, list elements are clumped together with no spaces between them, and there's no indication whatsoever that the author indicated these to be a list. Change to insert Markdown list syntax with linebreaks and dashes, so users can at least understand there's a list there. Similar change for ordered lists. This will still be broken for nested lists, but it didn't seem worth it to put a lot of effort into this (or other revamps, like making bold/italics/code work properly) because it seems like the current text handling in Ice Cubes is suboptimal and eventually slated for improvement (according to #1459 (comment)). So this is more designed to make lists "less broken" in some cases, rather than be a comprehensive fix for all lists in all cases.
…llian#1690) While SwiftUI's `Text` view won't display these in an `AttributedString` even if they get parsed from Markdown (which would also require the use of the `.full` option instead of the `.inlineOnlyPresrevingWhitespace` option), we can improve the appearance somewhat. Currently, list elements are clumped together with no spaces between them, and there's no indication whatsoever that the author indicated these to be a list. Change to insert Markdown list syntax with linebreaks and dashes, so users can at least understand there's a list there. Similar change for ordered lists. This will still be broken for nested lists, but it didn't seem worth it to put a lot of effort into this (or other revamps, like making bold/italics/code work properly) because it seems like the current text handling in Ice Cubes is suboptimal and eventually slated for improvement (according to Dimillian#1459 (comment)). So this is more designed to make lists "less broken" in some cases, rather than be a comprehensive fix for all lists in all cases.
…llian#1690) While SwiftUI's `Text` view won't display these in an `AttributedString` even if they get parsed from Markdown (which would also require the use of the `.full` option instead of the `.inlineOnlyPresrevingWhitespace` option), we can improve the appearance somewhat. Currently, list elements are clumped together with no spaces between them, and there's no indication whatsoever that the author indicated these to be a list. Change to insert Markdown list syntax with linebreaks and dashes, so users can at least understand there's a list there. Similar change for ordered lists. This will still be broken for nested lists, but it didn't seem worth it to put a lot of effort into this (or other revamps, like making bold/italics/code work properly) because it seems like the current text handling in Ice Cubes is suboptimal and eventually slated for improvement (according to Dimillian#1459 (comment)). So this is more designed to make lists "less broken" in some cases, rather than be a comprehensive fix for all lists in all cases.
Mastodon stores the toots in HTML if there is any format information (e.g. markdown from the
glitch-soc
fork).Currently IceCubesApp only displays these toots in plain-text format, all formatting from the server are discarded.
It would be awesome, if it would display the posts formatted with HTML.
AFAIK, when posting a toot, it is sent in plaintext and depending on the server-configuration, the server then converts it to HTML if it detects any formatting (and the user has set it so on their server-profile in e.g.
glitch-soc
).Thank you for your consideration.
The text was updated successfully, but these errors were encountered: