Skip to content

Commit d523a99

Browse files
authored
fix(save-post): update post.isMarkdown accordingly (#109)
1 parent 6df396c commit d523a99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/commands/posts-list/save-post.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ export const savePostToCnblogs = async (input: Post | PostTreeItem | PostEditDto
149149
await saveFilePendingChanges(localFilePath);
150150
post.postBody = (await workspace.fs.readFile(Uri.file(localFilePath))).toString();
151151
post.title = await PostTitleSanitizer.unSanitize(post);
152+
post.isMarkdown = path.extname(localFilePath).endsWith('md') || post.isMarkdown;
152153

153154
if (!validatePost(post)) return false;
154155

0 commit comments

Comments
 (0)