You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title. Some valid types of links should be converted to hyperlinks for quick access; this feature could also set up for creating fuller text rendering later.
The text was updated successfully, but these errors were encountered:
I would suggest approaching this from a two-step perspective:
the message is transformed when sent into real markdown (e.g. unmasked links become links masked as their URL)
every message is rendered with markdown, the content is not transformed (neglecting any transformation required for custom markdown like Discord's negative heading)
This approach means that we probably need to store both the "original" content and the "transformed" content, otherwise when a user edits their message it won't contain the same plaintext in all cases.
In other words, the first step ("transforming") would be tweaking the plaintext of the message to essentially remove some syntax sugar, and the second step ("rendering") would be generating the styled HTML from that tweaked text. Is this correct?
Not nessarily removing syntax sugar (if we don't support things yes, we'd remove them) but rather taking plaintext and making markdown. For example if the user types a code block, we want to make sure that code block exists as Markdown expects (regardless of how we represent it ourselves). If a user types a link, we automatically mask it behind the scenes so it becomes a hyperlink when rendered.
The second step would be exactly that - there are even libraries to render markdown already, we probably don't need to brew our own for an MVP.
Title. Some valid types of links should be converted to hyperlinks for quick access; this feature could also set up for creating fuller text rendering later.
The text was updated successfully, but these errors were encountered: