Open black-puppydog opened 3 years ago
1 is very doable (one approach: refine regex to not match inline code, temporarily splice out code blocks from text & reintroduce after matching mentions)
2 i have no suggestions for / feels difficult
i probably won't get to this for a while, so anyone else is most certainly free to prod it π€
Another take on 1:
code
or pre
(or img src
or whatever)Another option: weirder syntax.
Example: <@christian>
Sure, this isn't a Good Solution in that it doesn't solve for <pre>
or <code>
elements, but it's also a hell of a lot less likely to happen randomly. What do y'all think? :man_shrugging:
I'd really love to get this quickfixed before the next release, what do y'all think the easiest solution is here? Also, does this mean that email addresses get replaced?
Maybe also useful: how big of a problem do others think this is? If I had known this during review I don't think I would've merged the PR, but reverting it feels bad. Do others think this is small enough that we should release it to the public in this state, or should it be fixed, or what should we do? I don't like Oasis having a big bug and not having any energy to fix it. :/
I think oasis is much better with the last pr than without it.
This will come back to bite for emails and other spurious things.
Personally I'd prefer a way of "freezing" mention substitution so I can edit until I'm happy with the post, then preview one last time without mention magic, then send it off. But an extra checkbox might make the posting form a bit clunky. Might be down to presentation and good UI strings... :thinking:
Maybe when you're in the preview page the publish button should be "publish exactly what I just said with no substitutions"? I'm honestly kinda fond of requiring @@mention
or @[mention]
or similar, but I understand that's also kinda hacky as shit.
(I actually really like <@mention>
since <>
is an explicit Markdown link and it should never coincide with emails/etc.)
What's the problem you want solved?
This happened in
%zfgm5l/INLI9Nggn7hzniQjzr2mr2aC9korQ/UpARTQ=.sha256
: I tried to post this text:The mentions flow made it into this:
There are IMO two issues with this, but I think they may be worth thinking about together first, and breaking them up later:
Is there a solution you'd like to recommend?