Skip to content
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

Add support for formatting in messages #39

Merged
merged 1 commit into from
Oct 24, 2020

Conversation

rihardsk
Copy link
Contributor

@rihardsk rihardsk commented Oct 22, 2020

Closes #9, closes #26

This basically is how the hangups client itself handles formatting. It supports _italics_, **bold**, <del>strikethrough</del>, http://example.com/urls and maybe something more.

.. instead of creating a single text-only segment. This should add support for
formatting withing messages, e.g, recognising urls
@tulir tulir self-requested a review October 24, 2020 13:55
Copy link
Member

@tulir tulir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct way to bridge formatting, but I guess it's not worth making a proper parser if Google will finally replace Hangouts with Google Chat next year

@tulir tulir merged commit 54f7e42 into mautrix:master Oct 24, 2020
@rihardsk
Copy link
Contributor Author

Out of interest, what is the proper way? Should I have parsed formatted_body instead?

@tulir
Copy link
Member

tulir commented Oct 24, 2020

Yes. body is plaintext, not markdown. Parsing the HTML in formatted_body is the correct way to handle formatting. (for example: facebook bridge parser and telegram bridge parser which use this mautrix-python utility)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants