diff --git a/motions/jumpToHeading.ts b/motions/jumpToHeading.ts index c29d6f2..020c967 100644 --- a/motions/jumpToHeading.ts +++ b/motions/jumpToHeading.ts @@ -1,5 +1,5 @@ import { MotionFn } from "./utils/defineObsidianVimMotion"; -import { jumpToPattern } from "./utils/getNthInstanceOfPattern"; +import { jumpToPattern } from "./utils/jumpToPattern"; const HEADING_REGEX = /^#+ /gm; diff --git a/motions/jumpToLink.ts b/motions/jumpToLink.ts index 712ede4..7745abe 100644 --- a/motions/jumpToLink.ts +++ b/motions/jumpToLink.ts @@ -1,5 +1,5 @@ import { MotionFn } from "./utils/defineObsidianVimMotion"; -import { jumpToPattern } from "./utils/getNthInstanceOfPattern"; +import { jumpToPattern } from "./utils/jumpToPattern"; const LINK_REGEX = /\[\[[^\]\]]+?\]\]/g; diff --git a/motions/utils/getNthInstanceOfPattern.ts b/motions/utils/jumpToPattern.ts similarity index 96% rename from motions/utils/getNthInstanceOfPattern.ts rename to motions/utils/jumpToPattern.ts index 7488f03..ebaff9f 100644 --- a/motions/utils/getNthInstanceOfPattern.ts +++ b/motions/utils/jumpToPattern.ts @@ -34,7 +34,7 @@ export function jumpToPattern({ * Returns the index of (up to) the n-th instance of a pattern in a string after a given starting * index. If the pattern is not found at all, returns undefined. */ -export function getNthNextInstanceOfPattern({ +function getNthNextInstanceOfPattern({ content, regex, startingIdx, @@ -59,7 +59,7 @@ export function getNthNextInstanceOfPattern({ * Returns the index of (up to) the nth-last instance of a pattern in a string before a given * starting index. If the pattern is not found at all, returns undefined. */ -export function getNthPreviousInstanceOfPattern({ +function getNthPreviousInstanceOfPattern({ content, regex, startingIdx,