Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
fedicat
fedicat
@fedicat@pc.cafe  ·  activity timestamp last week

#FediMeteo reports make good html parse and render tests

screenshot of a fedimeteo weather report post with lots of boldface and emojis and line and paragraph breaks and bulleted lists

Begin detected text:

12:51Home vSalt Lake City - Utah - FediMeteo (bot)salt_lake_city__utah@us.fedimeteo.comWeather for Salt Lake City, Utah1/12/2026Current temperature (at 22:41): 27.7°F(Partly cloudy)Wind speed: 2.7 mph (1.2 m/s), direction:· 156°Air Quality:• AQI: 73) (Moderate)• PM2.5: 35.5 ug/m°• PM10: 36.1 ug/m°Forecast for the coming days:• Monday 12 January: Min 22.3°, Max 50.0°(Fog)i, Wind speed: 5.8 mph (2.6 m/s),direction: < 207°• Tuesday 13 January: Min 27.0°, Max 53.1°(Fog), Wind speed: 5.2 mph (2.3 m/s),direction: < 231°• Wednesday 14 January: Min 36.9°, Max46.0° (Partly cloudy) *5, Wind speed: 6.8mph (3.0 m/s), direction: T 349°• Thursday 15 January: Min 36.1°, Max 45.3°(Cloudy), Wind speed: 4.3 mph (1.9 m/s), direction: T 341°• Friday 16 January: Min 36.5°, Max 47.1°(Partly cloudy), Wind speed: 4.0 mph

End of detected text
screenshot of a fedimeteo weather report post with lots of boldface and emojis and line and paragraph breaks and bulleted lists Begin detected text: 12:51Home vSalt Lake City - Utah - FediMeteo (bot)salt_lake_city__utah@us.fedimeteo.comWeather for Salt Lake City, Utah1/12/2026Current temperature (at 22:41): 27.7°F(Partly cloudy)Wind speed: 2.7 mph (1.2 m/s), direction:· 156°Air Quality:• AQI: 73) (Moderate)• PM2.5: 35.5 ug/m°• PM10: 36.1 ug/m°Forecast for the coming days:• Monday 12 January: Min 22.3°, Max 50.0°(Fog)i, Wind speed: 5.8 mph (2.6 m/s),direction: < 207°• Tuesday 13 January: Min 27.0°, Max 53.1°(Fog), Wind speed: 5.2 mph (2.3 m/s),direction: < 231°• Wednesday 14 January: Min 36.9°, Max46.0° (Partly cloudy) *5, Wind speed: 6.8mph (3.0 m/s), direction: T 349°• Thursday 15 January: Min 36.1°, Max 45.3°(Cloudy), Wind speed: 4.3 mph (1.9 m/s), direction: T 341°• Friday 16 January: Min 36.5°, Max 47.1°(Partly cloudy), Wind speed: 4.0 mph End of detected text
screenshot of a fedimeteo weather report post with lots of boldface and emojis and line and paragraph breaks and bulleted lists Begin detected text: 12:51Home vSalt Lake City - Utah - FediMeteo (bot)salt_lake_city__utah@us.fedimeteo.comWeather for Salt Lake City, Utah1/12/2026Current temperature (at 22:41): 27.7°F(Partly cloudy)Wind speed: 2.7 mph (1.2 m/s), direction:· 156°Air Quality:• AQI: 73) (Moderate)• PM2.5: 35.5 ug/m°• PM10: 36.1 ug/m°Forecast for the coming days:• Monday 12 January: Min 22.3°, Max 50.0°(Fog)i, Wind speed: 5.8 mph (2.6 m/s),direction: < 207°• Tuesday 13 January: Min 27.0°, Max 53.1°(Fog), Wind speed: 5.2 mph (2.3 m/s),direction: < 231°• Wednesday 14 January: Min 36.9°, Max46.0° (Partly cloudy) *5, Wind speed: 6.8mph (3.0 m/s), direction: T 349°• Thursday 15 January: Min 36.1°, Max 45.3°(Cloudy), Wind speed: 4.3 mph (1.9 m/s), direction: T 341°• Friday 16 January: Min 36.5°, Max 47.1°(Partly cloudy), Wind speed: 4.0 mph End of detected text
  • Copy link
  • Flag this post
  • Block
Matthew Flint
Matthew Flint
@matthew@mastodon.me.uk replied  ·  activity timestamp last week

@fedicat
Hmm, you have unordered lists there!
I’ve tried that with SwiftUI’s markdown support, but haven’t been able to get it to work.
What’s your secret?

  • Copy link
  • Flag this comment
  • Block
fedicat
fedicat
@fedicat@pc.cafe replied  ·  activity timestamp last week

@matthew I switched to this, has pretty good markdown support, but one thing I had to adjust for, it doesn't recognize linebreaks as linebreaks, requires ending the line with two spaces

https://github.com/gonzalezreal/textual

GitHub

GitHub - gonzalezreal/textual: Render and customize rich attributed text in SwiftUI

Render and customize rich attributed text in SwiftUI - gonzalezreal/textual
  • Copy link
  • Flag this comment
  • Block
Matthew Flint
Matthew Flint
@matthew@mastodon.me.uk replied  ·  activity timestamp last week

@fedicat
Ah, nice, thanks for the pointer. I’ll take a look :)

That “two spaces” rule is standard markdown.

  • Copy link
  • Flag this comment
  • Block
fedicat
fedicat
@fedicat@pc.cafe replied  ·  activity timestamp last week

@matthew it also has really nice fenced code block support, including per-language syntax highlighting

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct