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

Use formatted_body to parse markdown #133

Closed
ajbura opened this issue Oct 8, 2021 · 2 comments
Closed

Use formatted_body to parse markdown #133

ajbura opened this issue Oct 8, 2021 · 2 comments
Labels
type: improvement Functionality that doesn't exist but can be improved

Comments

@ajbura
Copy link
Member

ajbura commented Oct 8, 2021

@tulir:maunium.net

formatting: don't parse body as markdown, use the html in formatted_body (https://matrix.org/docs/spec/client_server/r0.6.1#m-room-message-msgtypes)

@ajbura ajbura added the type: improvement Functionality that doesn't exist but can be improved label Nov 7, 2021
samueldr added a commit to samueldr/cinny that referenced this issue Nov 9, 2021
This fixes cinnyapp#133 by using the `formatted_body` field, like the spec
requires.

Additionally, this solves discrepancies in rendering text vs. markdown
messages.

TODO:

 - [ ] check `<img>` tags work (e.g. custom emoticons)

Note:

This does not handle translating `<a>` elements with matrix.to URLs to
their "correct" mention types. A future PR should handle this.

→ https://spec.matrix.org/unstable/client-server-api/#user-room-and-group-mentions
samueldr added a commit to samueldr/cinny that referenced this issue Nov 9, 2021
This fixes cinnyapp#133 by using the `formatted_body` field, like the spec
requires.

Additionally, this solves minor discrepancies in rendering text vs.
markdown messages.

Note:

This does not handle translating `<a>` elements with matrix.to URLs to
their "correct" mention types. A future PR should handle this.

→ https://spec.matrix.org/unstable/client-server-api/#user-room-and-group-mentions
samueldr added a commit to samueldr/cinny that referenced this issue Nov 10, 2021
This fixes cinnyapp#133 by using the `formatted_body` field, like the spec
requires.

Additionally, this solves minor discrepancies in rendering text vs.
markdown messages.

Note:

This does not handle translating `<a>` elements with matrix.to URLs to
their "correct" mention types. A future PR should handle this.

→ https://spec.matrix.org/unstable/client-server-api/#user-room-and-group-mentions
@Salamandar
Copy link

That will also allow displaying links, colored text and such :D

@samueldr
Copy link
Contributor

It does; I think it makes custom emoticons work as the receiving end too if I'm not mistaken

image

mxc:// images just work. (The clippit in the message here is done with an mxc:// image, colors and formatting comes from formatted_body shenanigans sent from another client.)

It changes nothing about sending anything fancy with the current state. I still need to fix at least one issue I've observed, but I've been dogfooding the WIP work fo over a week and only newlines in formatted body seems to be causing issues.

Huh... just tested against element and the issue seems to be on the sending side of things. I'll have to investigate, but that means I still haven't seen an issue.

samueldr added a commit to samueldr/cinny that referenced this issue Nov 19, 2021
This fixes cinnyapp#133 by using the `formatted_body` field, like the spec
requires.

Additionally, this solves minor discrepancies in rendering text vs.
markdown messages.

Note:

This does not handle translating `<a>` elements with matrix.to URLs to
their "correct" mention types. A future PR should handle this.

→ https://spec.matrix.org/unstable/client-server-api/#user-room-and-group-mentions
ajbura added a commit that referenced this issue Nov 21, 2021
@ajbura ajbura closed this as completed Dec 13, 2021
greentore pushed a commit to greentore/greeny that referenced this issue Feb 13, 2023
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.5.1 to 3.6.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v3.5.1...v3.6.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement Functionality that doesn't exist but can be improved
Projects
None yet
Development

No branches or pull requests

3 participants