Refactor: centralize metadata sidecar helpers and custom-result builders
This commit is contained in:
@@ -2,7 +2,7 @@ import { app } from "../../../../../scripts/app.js";
|
||||
import { api } from "../../../../../scripts/api.js";
|
||||
import { $el } from "../../../../../scripts/ui.js";
|
||||
import { getSvgIcon } from "../../utils/icon_utils.js";
|
||||
import { escapeHtml, escapeJsString, pollBackgroundTask } from "./html_utils.js";
|
||||
import { escapeHtml, escapeJsString, getFilenameFromPath, pollBackgroundTask } from "./html_utils.js";
|
||||
|
||||
export const renderFormatMethods = {
|
||||
encodeContextMenuModel(context = null) {
|
||||
@@ -80,8 +80,7 @@ export const renderFormatMethods = {
|
||||
},
|
||||
|
||||
getFilenameFromPath(path) {
|
||||
if (!path) return '';
|
||||
return path.split(/[\/\\]/).pop() || path;
|
||||
return getFilenameFromPath(path);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user