Skip to content

Commit

Permalink
style: multi comments typos (#4403)
Browse files Browse the repository at this point in the history
  • Loading branch information
KuthorX committed Jul 6, 2020
1 parent d884683 commit 339c6c2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/extend/injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Injector {
return '<!-- hexo injector ' + flag + ' start -->' + content + '<!-- hexo injector ' + flag + ' end -->';
});

// avoid unnesscary replace() for better performance
// avoid unnecessary replace() for better performance
if (!code.length) return data;
return data.replace(pattern, str => { return isBegin ? str + code : code + str; });
};
Expand Down
2 changes: 1 addition & 1 deletion lib/hexo/load_theme_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = ctx => {

ctx.log.debug('Second Theme Config loaded: %s', magenta(tildify(configPath)));

// ctx.config.theme_config should have highest piority
// ctx.config.theme_config should have highest priority
// If ctx.config.theme_config exists, then merge it with _config.[theme].yml
// If ctx.config.theme_config doesn't exist, set it to _config.[theme].yml
ctx.config.theme_config = ctx.config.theme_config
Expand Down
2 changes: 1 addition & 1 deletion lib/hexo/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class Post {
return Promise.reject(new Error('No input file or string!')).asCallback(callback);
}

// disable Nunjucks when the renderer spcify that.
// disable Nunjucks when the renderer specify that.
const disableNunjucks = ext && ctx.render.renderer.get(ext) && !!ctx.render.renderer.get(ext).disableNunjucks;

const cacheObj = new PostRenderCache();
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/filter/before_post_render/backtick_code_block.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function backtickCodeBlock(data) {
// neither highlight or prismjs is enabled, return escaped content directly.
if (!hljsCfg.enable && !prismCfg.enable) return escapeSwigTag($0);

// Extrace langauge and caption of code blocks
// Extract language and caption of code blocks
const args = _args.split('=').shift();
let lang, caption;

Expand All @@ -44,7 +44,7 @@ function backtickCodeBlock(data) {

// PR #3765
if (start.includes('>')) {
// headding of last line is already removed by the top RegExp "rBacktick"
// heading of last line is already removed by the top RegExp "rBacktick"
const depth = start.split('>').length - 1;
const regexp = new RegExp(`^([^\\S\\r\\n]*>){0,${depth}}([^\\S\\r\\n]|$)`, 'mg');
content = content.replace(regexp, '');
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/helper/paginator.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const pagenasionPartShow = (tags, options, ctx) => {
tags.push(spaceHtml);
}

// Dispaly pages on the right edge
// Display pages on the right edge
for (let i = rightEnd; i <= total; i++) {
tags.push(pageTag(i));
}
Expand Down

0 comments on commit 339c6c2

Please sign in to comment.