After following a link to a heading, clicking to place the cursor at the end of any line that concludes with Markdown formatting (bold, italics, link brackets, etc.) causes the cursor to appear before the formatting characters rather than at the actual end of the line.
Steps to reproduce
- Find or create a file with at least one heading and one line that ends with Markdown formatting characters.
- Create a link to that heading.
- Follow the heading.
- With the section still highlighted (see Figure 1 below), click to place the cursor at the end of a line ending with Markdown formatting.
The following demo file content works nicely:
[Heading link glitch test.md]
*I am italicized*
# I am a heading
This line ends with a **bold statement.**
```here is code ```
[[Heading link glitch test#I am a heading]]
Did you follow the troubleshooting guide? [Y/N]
Yes
Expected result
Cursor appears at the true end of the line (no characters after it). See Figure 2 below.
Actual result
Cursor appears inside any markdown formatting characters present at the end of the line. See Figure 3 below.
Environment
SYSTEM INFO:
Obsidian version: v1.4.2
Installer version: v1.3.5
Operating system: Darwin Kernel Version 21.6.0: Mon Apr 24 21:10:53 PDT 2023; root:xnu-8020.240.18.701.5~1/RELEASE_X86_64 21.6.0
Login status: logged in
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Additional information
It appears to be connected with the fact that the section pertaining to that heading is highlighted. As long as the highlighting remains, clicking on an affected line will cause the behavior (unless the syntax is already exposed. The only exception I have found is if you have already exposed the syntax by moving the cursor with the arrow keys.
Figure 1: Highlighted section after following the heading link.
Figure 2: Expected cursor placement when you click the end of the “bold statement” line.
Figure 3. Actual cursor placement when you click the end of the “bold statement” line.