added unix time to copyfiles for markdown

This commit is contained in:
henry
2025-01-15 22:54:34 -06:00
parent c799d209cd
commit da45c202b2
2 changed files with 2 additions and 1 deletions

View File

@@ -96,6 +96,7 @@ function resolveCopyDestinationSetting(documentUri: vscode.Uri, fileName: string
// File
['fileName', fileName], // The file name of the dropped file, e.g. `image.png`.
['fileExtName', path.extname(fileName).replace('.', '')], // The extension of the dropped file, e.g. `png`.
['unixTime', Math.floor(Date.now() / 1000).toString()], // The current Unix timestamp in seconds.
]);
return outDest.replaceAll(/(?<escape>\\\$)|(?<!\\)\$\{(?<name>\w+)(?:\/(?<pattern>(?:\\\/|[^\}\/])+)\/(?<replacement>(?:\\\/|[^\}\/])*)\/)?\}/g, (match, _escape, name, pattern, replacement, _offset, _str, groups) => {