Link to header don‘t update,when use - instead of space

Steps to reproduce

Thers is a page Dog.md,and it has a header ## what is a dog

There is a link to header [Dog](Dog.md#what-is-a-dog)

When use the rename header function to update the header to ## what is dog,the link don’t update

Expected result

[Dog](Dog.md#what-is-dog)

Actual result

[Dog](Dog.md#what-is-a-dog)

For headers, you need to use the rename header function (right click menu).

I use this function,and there is a bug.
I’m sorry, I hasn’t describe clearly

Hello

[Dog](Dog.md#what-is-a-dog)

…is not valid. The spaces need %20 or + not -.

These both work:

[Dog](dog#What%20Is%20A%20Dog)

[Dog](dog#What+Is+A+Dog)

If you then select the heading in the target file, right click and choose ‘Rename this heading…’, the syntax should update in the link.

In my tests, the renamed heading changed the two links above to:

[Dog](dog#It%20is%20Not%20a%20Cat)

[Dog](dog#It%20is%20Not%20a%20Cat)

As you can see, internally Obsidian defaults to the %20 version.

Percent Encoding

Character Encoding
: %3A
/ %2F
? %3F
# %23
[ %5B
] %5D
@ %40
! %21
$ %24
& %26
%27
( %28
) %29
* %2A
+ %2B
, %2C
; %3B
= %3D
% %25
SPACE %20 or +

Hope this works for you.

Angel