vnotex / vnote

A pleasant note-taking platform in native C++.
https://app.vnote.fun
GNU Lesser General Public License v3.0
11.78k stars 1.21k forks source link

insert relative reference link just keeps file name and reference part missed. #2515

Open hitanvil opened 3 months ago

hitanvil commented 3 months ago

Describe the bug insert relative reference link just keeps file name and reference part missed.

To Reproduce Steps to reproduce the behavior:

  1. Create a new note file
  2. Create two first level title Title1 and Title2 in the file
  3. Copy Title1's link address
  4. Under Title2, paste the link by "Insert As Link", set text as full_path.
  5. Click on full_path, focus can go back to Title1
  6. Under Title2, paste the link by "Insert As Relative Link", set text as rel_path
  7. Click on rel_path, focus does not change

Expected behavior It is expected that both full path and rel path can change focus to Title1. The problem dues to when inserting relative link, only file name is kept but #Title1 part are missed. It is shown in below screenshots.

Screenshots image

Desktop (please complete the following information):

Additional context