Skip to content

Commit

Permalink
Allow the publish command to handle files with filenames separated by…
Browse files Browse the repository at this point in the history
… spaces in the _draft folder.
  • Loading branch information
IBG committed Apr 21, 2024
1 parent 093dc2d commit 63c503e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/hexo/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,7 @@ class Post {
const { config } = ctx;
const draftDir = join(ctx.source_dir, '_drafts');
const slug = slugize(data.slug.toString(), { transform: config.filename_case });
data.slug = slug;
const regex = new RegExp(`^${escapeRegExp(slug)}(?:[^\\/\\\\]+)`);
const regex = new RegExp(`^${escapeRegExp(data.slug.toString())}(?:[^\\/\\\\]+)`);
let src = '';
const result: Result = {};

Expand Down

0 comments on commit 63c503e

Please sign in to comment.