foam
foam copied to clipboard
Lost escape character (\) in table after rename a file
Describe the bug
- Give an simple table and wikilink with an alias like this, I use
\
to escape|
because this wikilink is in a table.
| |
| -------------- |
| [[test\|Test]] |
- After I rename the
test.md
file totest2.md
, the table will be updated like this (missing the\
)
| |
| -------------- |
| [[test2|Test]] |
Small Reproducible Example
No response
Steps to Reproduce the Bug or Issue
- Create a new note with this content:
| |
| -------------- |
| [[test\|Test]] |
- Create a
test.md
file. - Rename the
test.md
totest2.md
. - Verify the table in the first note.
Expected behavior
As a user, I expect that after I rename a file, the wikilink in a table does not remove escape character.
Screenshots or Videos
No response
Operating System Version
Linux
Visual Studio Code Version
1.66.1
Additional context
Foam version v0.18.3
Yup, I know what causes this issue, and I have an idea of how we could go about fixing it.
Will take a look when I have some time, but if you or someone wants to address it, look at the MarkdownlLink.createUpdateLinkEdit
function.
My guess is that we'd need to check what separator was used in the original link, and reuse that, but this needs to be looked at properly and tested.