mirror of
https://github.com/kdnk/obsidian-automatic-linker.git
synced 2026-07-22 12:00:30 +00:00
refactor: reorganize replace-links module and add ignoreCase option
This commit is contained in:
parent
f6214f97c8
commit
36aadfea6b
4 changed files with 2 additions and 19 deletions
|
|
@ -9,7 +9,7 @@ import {
|
|||
PluginManifest,
|
||||
} from "obsidian";
|
||||
import { PathAndAliases } from "./path-and-aliases.types";
|
||||
import { replaceLinks } from "./replace-links";
|
||||
import { replaceLinks } from "./replace-links/replace-links";
|
||||
import { formatGitHubURL } from "./replace-urls/github";
|
||||
import { formatJiraURL } from "./replace-urls/jira";
|
||||
import { AutomaticLinkerPluginSettingsTab } from "./settings/settings";
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
export { replaceLinks } from "./replace-links";
|
||||
export type { ReplaceLinksOptions } from "./types";
|
||||
|
|
@ -21,6 +21,7 @@ export const replaceLinks = ({
|
|||
namespaceResolution?: boolean;
|
||||
baseDir?: string;
|
||||
ignoreDateFormats?: boolean;
|
||||
ignoreCase?: boolean;
|
||||
};
|
||||
}): string => {
|
||||
// Return the body unchanged if its length is below the minimum character count.
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
import { CandidateData, TrieNode } from "../trie";
|
||||
|
||||
export interface ReplaceLinksOptions {
|
||||
body: string;
|
||||
linkResolverContext: {
|
||||
filePath: string;
|
||||
trie: TrieNode;
|
||||
candidateMap: Map<string, CandidateData>;
|
||||
};
|
||||
settings?: {
|
||||
minCharCount?: number;
|
||||
namespaceResolution?: boolean;
|
||||
baseDir?: string;
|
||||
ignoreDateFormats?: boolean;
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue