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

Regarding representation of rich text in text messages #166

Open
blueset opened this issue Apr 20, 2019 · 2 comments
Open

Regarding representation of rich text in text messages #166

blueset opened this issue Apr 20, 2019 · 2 comments

Comments

@blueset
Copy link
Member

blueset commented Apr 20, 2019

Looking for a general, easy to parse, convert and subset representation of rich text in text messages.

Rich text representation in some IMs:

  • Telegram
    Bold, italics, monospaced, monospaced block, link, strikethrough and underline, @ reference. Nesting supported.
    (offset, length, attributes); Markdown subset; HTML subset;
  • Slack
    Bold, italics, strikethrough, quote, inline code, block code, list, link, user&channel reference, etc. Nesting allowed.
    mrkdwn (variation of Markdown)
  • Discord
    Bold, italics, strikethrough, underline, inline code, code block, syntax highlighting, spoiler alerts. Nesting allowed.
    Markdown subset.
  • WeChat
    None.
  • Facebook Messenger
    Bold, italic, strikethrough, monospace, codeblock, LaTeX (\(\sin(2\pi)\)).
    Web only.
  • QQ (CoolQ Pro)
    Inline image, custom emoticon.
    CoolQ token in messages.
  • Line
    Custom emoticon.
    Unicode Private Use Area.
  • XMPP (Extension)
    Bold, italics, strikethrough, monospaced, quote. Nesting allowed.
    Markdown subset, extended. (XEP-0393)
  • IRC
    None.
  • Rocket Chat
    Bold, italic, strikethrough, inline code, image, link. Nesting allowed.
    Markdown subset.
  • Skype
    Bold, italic, strikethrough, inline code, code block.
    Markdown-like.
@blueset
Copy link
Member Author

blueset commented Jun 28, 2019

Will try to make markdown as a common syntax as it being the majority base syntax, and an attribute to specify whether the text should be in markdown-like format.

However Markdown is still less organised, and harder to escape compare to HTML (which has a relatively established standard for formatting). I'm still undecided about whether to use HTML or Markdown for this.

@blueset
Copy link
Member Author

blueset commented Jan 28, 2020

Telegram recently added more formatting and nesting support to its bot API. They have resolved to a new variation of Markdown, and extending the existing HTML syntax for the new change.

However, in the background Telegram is using the message entity format, i.e. a mapping of offset, length, entity type and parameters.

Ideas on which format is better and how to establish the spec is welcomed.

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

No branches or pull requests

1 participant