Skip to content

Add proper text formatting for messages#67

Merged
viktorstrate merged 4 commits intomainfrom
text-formatting
Mar 10, 2026
Merged

Add proper text formatting for messages#67
viktorstrate merged 4 commits intomainfrom
text-formatting

Conversation

@viktorstrate
Copy link
Owner

@viktorstrate viktorstrate commented Mar 10, 2026

This fixes #63. Instead of rendering the raw markdown body of a message, with some limited formatting, instead convert the formattedBody HTML attribute into an NSAttributedString that is rendered in an NSTextField.

Screenshot 2026-03-10 at 09 41 19 Screenshot 2026-03-10 at 09 40 40

Todos

  • Fix issues with calculating the proper height of timeline rows.
  • Tweak the formatting options and spacing.
  • Make it work with custom font sizes.

@viktorstrate viktorstrate marked this pull request as ready for review March 10, 2026 14:05
@viktorstrate
Copy link
Owner Author

Although the formatting is not always perfect, this is mostly a limitation of the ZMarkupParser library. Eventually we would probably want a custom HTML parser to NSAttributedString, such that we have complete control of the rendering.

@viktorstrate viktorstrate merged commit d676c5f into main Mar 10, 2026
2 checks passed
@viktorstrate viktorstrate deleted the text-formatting branch March 10, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Correctly render Markdown content

1 participant