mirror of
https://github.com/kdnk/obsidian-automatic-linker.git
synced 2026-07-22 05:37:46 +00:00
chore: rename "Consider Aliases" to "Include Aliases"
This commit is contained in:
parent
a82c87d91c
commit
e591f59df2
4 changed files with 9 additions and 9 deletions
|
|
@ -95,7 +95,7 @@ Access these commands via the Command Palette (Cmd/Ctrl + P):
|
|||
|
||||
### Link Behavior
|
||||
|
||||
- **Consider Aliases**: Include frontmatter aliases when matching text
|
||||
- **Include Aliases**: Include frontmatter aliases when matching text
|
||||
- **Proximity-based Linking**: Automatically resolve shorthand to full namespaced links
|
||||
- **Ignore Case**: Enable case-insensitive link matching
|
||||
- **Prevent Self-Linking**: Don't create links from a file to itself
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ export default class AutomaticLinkerPlugin extends Plugin {
|
|||
const exclude = isLinkingExcluded(metadata)
|
||||
|
||||
const aliases = (() => {
|
||||
if (this.settings.considerAliases) {
|
||||
if (this.settings.includeAliases) {
|
||||
const frontmatter = this.app.metadataCache.getFileCache(file)?.frontmatter
|
||||
const aliases = parseFrontMatterAliases(frontmatter)
|
||||
return aliases
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ export type AutomaticLinkerSettings = {
|
|||
formatOnSave: boolean
|
||||
showNotice: boolean
|
||||
respectNewFileFolderPath: boolean // Respect Obsidian's "Folder to create new notes in" setting as base directory
|
||||
considerAliases: boolean // Consider aliases when linking
|
||||
includeAliases: boolean // Include aliases when linking
|
||||
proximityBasedLinking: boolean // Automatically resolve namespaces for shorthand links
|
||||
ignoreDateFormats: boolean // Ignore date formatted links (e.g. 2025-02-10)
|
||||
ignoreHeadings: boolean // Ignore headings (lines starting with #) when adding links
|
||||
|
|
@ -27,7 +27,7 @@ export const DEFAULT_SETTINGS: AutomaticLinkerSettings = {
|
|||
formatOnSave: false,
|
||||
showNotice: false,
|
||||
respectNewFileFolderPath: true, // Default: do not respect Obsidian's "Folder to create new notes in" setting
|
||||
considerAliases: true, // Default: consider aliases
|
||||
includeAliases: true, // Default: include aliases
|
||||
proximityBasedLinking: true, // Default: enable automatic namespace resolution
|
||||
ignoreDateFormats: true, // Default: ignore date formats (e.g. 2025-02-10)
|
||||
ignoreHeadings: false, // Default: do not ignore headings
|
||||
|
|
|
|||
|
|
@ -45,17 +45,17 @@ export class AutomaticLinkerPluginSettingsTab extends PluginSettingTab {
|
|||
})
|
||||
})
|
||||
|
||||
// Toggle for considering aliases.
|
||||
// Toggle for including aliases.
|
||||
new Setting(containerEl)
|
||||
.setName("Consider aliases")
|
||||
.setName("Include aliases")
|
||||
.setDesc(
|
||||
"When enabled, aliases will be taken into account when processing links. Note: A restart is required for changes to take effect.",
|
||||
"When enabled, aliases will be included when processing links. Note: A restart is required for changes to take effect.",
|
||||
)
|
||||
.addToggle((toggle) => {
|
||||
toggle
|
||||
.setValue(this.plugin.settings.considerAliases)
|
||||
.setValue(this.plugin.settings.includeAliases)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.considerAliases = value
|
||||
this.plugin.settings.includeAliases = value
|
||||
await this.plugin.saveData(this.plugin.settings)
|
||||
this.plugin.refreshFileDataAndTrie()
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue