Copy-pasting mentions (embed links) between documents does not work#649
Copy-pasting mentions (embed links) between documents does not work#649GaboHBeaumont wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Why are there so many changed files? I have no idea what to look for. I believe it's not rebased cc. @horacioh
6a9d267 to
cf60d98
Compare
|
I fix the commit, but now I realized that the AI messed Inline Embeds versus Mentions. How do we differentiate between Inline Embeds and Mentions? We agreed that Mentions are strictly for mentioning People. |
|
Inline embeds and mentions in the code should be treated the same. we should not have two different types for the same thing We can treat them differently in the UI, but in the permanent data should be the same |
|
@GaboHBeaumont You need to rebase your branch before you create the PR because if you don't rebase, you will include all the other code in your PR. so please rebase your branch first before pushing |
horacioh
left a comment
There was a problem hiding this comment.
Please rebase your branch first before we accept this PR.
cf60d98 to
35a794d
Compare
|
Fixed now:
Current head: Could you please take another look? |
Yes — you’re right. If the copied thing is a mention / inline embed, paste should recreate a mention / inline embed, not show raw hm:// links or ask via the “Insert as” menu.
What was happening:
A copied mention is represented in HTML as an anchor like:
Avatar options
But a normal link is also an anchor:
Avatar options
The generic link parser could claim the anchor before the inline-embed parser did, so the paste degraded into regular links / raw hm:// text.
I fixed that by:
giving a[data-inline-embed] parse rules higher priority
making the generic link parser explicitly ignore data-inline-embed anchors
keeping the prior clipboard serialization fixes so re-copying mentions still works