Skip to content

Commit

Permalink
refactor(post): simplify the <escape> regex pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Mar 4, 2020
1 parent 32d5638 commit 30fb8fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hexo/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const { copyDir, exists, listDir, mkdirs, readFile, rmdir, unlink, writeFile } =
const yfm = require('hexo-front-matter');

const preservedKeys = ['title', 'slug', 'path', 'layout', 'date', 'content'];
const rEscapeContent = /<escape(?:[^>]*)>([\s\S]*?)<\/escape>/g;
const rEscapeContent = /<escape>([\s\S]*?)<\/escape>/g;
const rPlaceholder = /(?:<|&lt;)!--hexoPostRenderEscape:(\d+)--(?:>|&gt;)/g;

class PostRenderCache {
Expand Down

0 comments on commit 30fb8fd

Please sign in to comment.