mirror of
https://github.com/dnlbauer/obsidian-dataview-autocompletion.git
synced 2026-09-10 14:15:29 +00:00
chore: fix code formatting
This commit is contained in:
@@ -72,10 +72,13 @@ export class DataviewSuggester extends EditorSuggest<String> {
|
||||
|
||||
renderMarkdownSuggestion(value: string, el: HTMLElement): void {
|
||||
// render markdown preview of inline dataview metadata field
|
||||
let suggestionText = this.context!.editor.getLine(this.context!.start.line).slice(this.context!.start.ch-1, this.context!.start.ch)!
|
||||
let suggestionText = this.context!.editor.getLine(this.context!.start.line).slice(
|
||||
this.context!.start.ch - 1,
|
||||
this.context!.start.ch,
|
||||
)!;
|
||||
suggestionText += value.replace(/<mark>(.*?)<\/mark>/g, "$1");
|
||||
suggestionText += suggestionText.startsWith("(") ? ")" : "]"
|
||||
|
||||
suggestionText += suggestionText.startsWith("(") ? ")" : "]";
|
||||
|
||||
MarkdownRenderer.render(
|
||||
this.app,
|
||||
htmlToMarkdown(suggestionText),
|
||||
|
||||
Reference in New Issue
Block a user