feat: Allow #heading as display title setting (#434)
* feat: Allow #heading as display name setting * Add displayTitle usage to create markdown link * Tweak description text * Address comments
This commit is contained in:
@@ -240,9 +240,10 @@
|
||||
// Generate link
|
||||
let link: string
|
||||
if (file && active) {
|
||||
link = plugin.app.fileManager.generateMarkdownLink(file, active.path)
|
||||
link = plugin.app.fileManager.generateMarkdownLink(file, active.path, "", selectedNote.displayTitle)
|
||||
} else {
|
||||
link = `[[${selectedNote.basename}.${getExtension(selectedNote.path)}]]`
|
||||
const maybeDisplayTitle = selectedNote.displayTitle === "" ? "" : `|${selectedNote.displayTitle}`
|
||||
link = `[[${selectedNote.basename}.${getExtension(selectedNote.path)}${maybeDisplayTitle}]]`
|
||||
}
|
||||
|
||||
// Inject link
|
||||
|
||||
Reference in New Issue
Block a user