Closed bobpaul closed 4 years ago
Message formatting can also be used to insert hyperlinks, which would fix #9
It looks like there's some examples here:
https://github.com/tdryer/hangups/blob/master/hangups/test/test_message_parser.py
Just guessing, but could the fix be something like changing this:
message_content=hangouts.MessageContent(
segment=[hangups.ChatMessageSegment(text).serialize()],
),
To this?
message_content=hangouts.MessageContent(
segment = [hangups.ChatMessageSegment(seg.text, **seg.params).serialize() for seg in ChatMessageParser.parse(text)],
),
Assuming ChatMessageParser
is imported as-is...
Steps
**bold** _italics_ <del>strike</del>
**bold** _italics_ <del>strike</del>
Expected Behavior mautrix-hangouts should parse
**foo**
as bold,_bar_
as italics, and<del>baz</del>
as strikethrough. mautrix-hangouts should divide the message into segments and apply formatting to each segment.