Ignore ts typing error, Fix SPDX license identifier in Obsidian plugin

This commit is contained in:
Debanjum Singh Solanky 2023-02-17 18:08:34 -06:00
parent 47569da38e
commit 053d6141f3
2 changed files with 3 additions and 2 deletions

View file

@ -10,7 +10,7 @@
},
"keywords": ["search"],
"author": "Debanjum Singh Solanky",
"license": "GPLv3",
"license": "GPL-3.0-or-later",
"devDependencies": {
"@types/node": "^16.11.6",
"@typescript-eslint/eslint-plugin": "5.29.0",

View file

@ -94,6 +94,7 @@ export class KhojModal extends SuggestModal<SearchResult> {
let entry_words = result.entry.split(' ')
let entry_snipped_indicator = entry_words.length > words_to_render ? ' **...**' : '';
let snipped_entry = entry_words.slice(0, words_to_render).join(' ');
// @ts-ignore
MarkdownRenderer.renderMarkdown(snipped_entry + entry_snipped_indicator, el, null, null);
}
@ -111,7 +112,7 @@ export class KhojModal extends SuggestModal<SearchResult> {
.find(file => result.file.endsWith(file.path))
// Open vault file at heading of chosen search result
if (file_match){
if (file_match) {
let resultHeading = result.entry.split('\n', 1)[0];
let linkToEntry = `${file_match.path}${resultHeading}`
this.app.workspace.openLinkText(linkToEntry, '');