Make Markdown more interoperable #153

Merged
fiatjaf merged 2 commits from safer-markdown into main 2023-01-28 10:41:02 +00:00
fiatjaf commented 2023-01-27 21:40:07 +00:00 (Migrated from github.com)

By disallowing the annoying link/image syntax that would cause terrible rendering bugs in other clients.

As result of this change, this note:

# titles still work

- lists
- still
- work

normal https://literal.links and `monospace` still work

**bold** and _italic_ still work

just [annoying](https://syntax-heavy.links/likethis) do not work, and ![the even](https://more.annoying/images.png)

normal images work fine: https://pixy.org/src/487/4870083.jpg

Renders like this:
2023-01-27-183610_699x896_scrot

By disallowing the annoying link/image syntax that would cause terrible rendering bugs in other clients. As result of this change, this note: ``` # titles still work - lists - still - work normal https://literal.links and `monospace` still work **bold** and _italic_ still work just [annoying](https://syntax-heavy.links/likethis) do not work, and ![the even](https://more.annoying/images.png) normal images work fine: https://pixy.org/src/487/4870083.jpg ``` Renders like this: ![2023-01-27-183610_699x896_scrot](https://user-images.githubusercontent.com/1653275/215205653-b346da44-8501-4b91-beed-dc41bd6ccc1e.png)
verbiricha (Migrated from github.com) reviewed 2023-01-27 22:28:40 +00:00
verbiricha (Migrated from github.com) left a comment

I like the idea but one problem I see with this approach is that ( and ) are valid URL characters and we end up rendering broken URLs since ) at the end is treated as part of the URL by our regex.

I like the idea but one problem I see with this approach is that `(` and `)` are valid URL characters and we end up rendering broken URLs since `)` at the end is treated as part of the URL by our regex.
fiatjaf commented 2023-01-27 23:18:44 +00:00 (Migrated from github.com)

That is the point: to discourage people from posting stuff in this syntax. They are rendering broken like that on every other client too.

But sure, let me see if there is a good fallback for this.

That is the point: to discourage people from posting stuff in this syntax. They are rendering broken like that on every other client too. But sure, let me see if there is a good fallback for this.
verbiricha (Migrated from github.com) approved these changes 2023-01-28 06:02:31 +00:00
Sign in to join this conversation.
No description provided.