mirror of
https://github.com/esm7/obsidian-vimrc-support.git
synced 2026-07-22 05:00:25 +00:00
Adjust/clarify docstring for jumpToNextLink
This commit is contained in:
parent
20eb7a0a4c
commit
43d708b655
1 changed files with 4 additions and 3 deletions
|
|
@ -14,9 +14,10 @@ const LINK_REGEX = new RegExp(LINK_REGEX_STRING, "g");
|
|||
/**
|
||||
* Jumps to the repeat-th next link.
|
||||
*
|
||||
* Note that since `jumpToPattern` uses `String.matchAll`, which internally updates `lastIndex`
|
||||
* after each match, it won't catch standalone URLs within wikilinks / markdown links
|
||||
* (which should be a good thing in most cases).
|
||||
* Note that `jumpToPattern` uses `String.matchAll`, which internally updates `lastIndex` after each
|
||||
* match; and that `LINK_REGEX` matches wikilinks / markdown links first. So, this won't catch
|
||||
* non-standalone URLs (e.g. the URL in a markdown link). This should be a good thing in most cases;
|
||||
* otherwise it could be tedious (as a user) for each markdown link to contain two jumpable spots.
|
||||
*/
|
||||
export const jumpToNextLink: MotionFn = (cm, cursorPosition, { repeat }) => {
|
||||
return jumpToPattern({
|
||||
|
|
|
|||
Loading…
Reference in a new issue