Skip to content

Commit

Permalink
Merge pull request #3696 from SukkaW/meta-generator
Browse files Browse the repository at this point in the history
refactor(meta_generator): use template string
  • Loading branch information
curbengh authored Aug 31, 2019
2 parents f57f700 + e0cba1f commit eca3cf2
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 eca3cf2

Please sign in to comment.