Skip to content

Commit d933dbd

Browse files
authored
Default to filename for markdown new file if empty (microsoft#183864)
Fixes microsoft#183848
1 parent 50527c9 commit d933dbd

File tree

1 file changed

+4
-1
lines changed
  • extensions/markdown-language-features/src/languageFeatures/copyFiles

1 file changed

+4
-1
lines changed

extensions/markdown-language-features/src/languageFeatures/copyFiles/copyFiles.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ export function resolveCopyDestination(documentUri: vscode.Uri, fileName: string
125125

126126

127127
function resolveCopyDestinationSetting(documentUri: vscode.Uri, fileName: string, dest: string, getWorkspaceFolder: GetWorkspaceFolder): string {
128-
let outDest = dest;
128+
let outDest = dest.trim();
129+
if (!outDest) {
130+
outDest = '${fileName}';
131+
}
129132

130133
// Destination that start with `/` implicitly means go to workspace root
131134
if (outDest.startsWith('/')) {

0 commit comments

Comments
 (0)