Skip to content

Commit

Permalink
refactor(meta_generator): use template string
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Aug 31, 2019
1 parent f57f700 commit e0cba1f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/plugins/filter/meta_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ function hexoMetaGeneratorInject(data) {
if (!config.meta_generator ||
data.match(/<meta\s+name=['|"]?generator['|"]?/i)) return;

const hexoGeneratorTag = '<meta name="generator" content="Hexo %s">'
.replace('%s', this.version);
const hexoGeneratorTag = `<meta name="generator" content="Hexo ${this.version}">`;

return data.replace('</title>', '</title>' + hexoGeneratorTag);
}
Expand Down

0 comments on commit e0cba1f

Please sign in to comment.