RuneStone 1.0.0
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { isImagePath, workspaceImageLink } from "../workspace/media.ts";
|
||||
|
||||
export function workspaceFileLink(notePath: string, filePath: string): string {
|
||||
const image = workspaceImageLink(notePath, filePath);
|
||||
if (isImagePath(filePath)) return image;
|
||||
const label = (filePath.replaceAll("\\", "/").split("/").pop() || filePath).replace(/[\\[\]]/g, "\\$&");
|
||||
return `[${label}]${image.slice(3)}`;
|
||||
}
|
||||
Reference in New Issue
Block a user