Skip to content

Commit 0257bb3

Browse files
fix typo (#5245)
1 parent b3b444d commit 0257bb3

File tree

7 files changed

+18
-19
lines changed

7 files changed

+18
-19
lines changed

lib/box/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,13 @@ function readDirWalker(ctx, base, results, ignore, prefix) {
280280
if (err && err.code === 'ENOENT') return null;
281281
throw err;
282282
});
283-
const prefixdPath = `${prefix}${path}`;
283+
const prefixPath = `${prefix}${path}`;
284284
if (stats) {
285285
if (stats.isDirectory()) {
286-
return readDirWalker(ctx, fullpath, results, ignore, `${prefixdPath}/`);
286+
return readDirWalker(ctx, fullpath, results, ignore, `${prefixPath}/`);
287287
}
288288
if (!isIgnoreMatch(fullpath, ignore)) {
289-
results.push(prefixdPath);
289+
results.push(prefixPath);
290290
}
291291
}
292292
});

lib/extend/syntax_highlight.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export interface HighlightOptions {
55
caption: string | undefined,
66
lines_length: number,
77

8-
// plulgins/filter/before_post_render/backtick_code_block
8+
// plugins/filter/before_post_render/backtick_code_block
99
firstLineNumber?: string | number
1010

1111
// plugins/tag/code.ts

lib/extend/tag.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,13 @@ const formatNunjucksError = (err, input, source = '') => {
182182
if (isNaN(errLine)) return err;
183183

184184
// trim useless info from Nunjucks Error
185-
const splited = err.message.split('\n');
185+
const splitted = err.message.split('\n');
186186

187187
const e = new NunjucksError();
188188
e.name = 'Nunjucks Error';
189189
e.line = errLine;
190-
e.location = splited[0];
191-
e.type = splited[1].trim();
190+
e.location = splitted[0];
191+
e.type = splitted[1].trim();
192192
e.message = getContext(input.split(/\r?\n/), errLine, e.location, e.type).join('\n');
193193
return e;
194194
};

lib/hexo/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ class Hexo extends EventEmitter {
512512
}, []);
513513
}
514514

515-
_routerReflesh(runningGenerators, useCache) {
515+
_routerRefresh(runningGenerators, useCache) {
516516
const { route } = this;
517517
const routeList = route.list();
518518
const Locals = this._generateLocals();
@@ -556,7 +556,7 @@ class Hexo extends EventEmitter {
556556

557557
// Run before_generate filters
558558
return this.execFilter('before_generate', this.locals.get('data'), { context: this })
559-
.then(() => this._routerReflesh(this._runGenerators(), useCache)).then(() => {
559+
.then(() => this._routerRefresh(this._runGenerators(), useCache)).then(() => {
560560
this.emit('generateAfter');
561561

562562
// Run after_generate filters

lib/hexo/post.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,16 +287,16 @@ class Post {
287287

288288
_renderScaffold(data) {
289289
const { tag } = this.context.extend;
290-
let splited;
290+
let splitted;
291291

292292
return this._getScaffold(data.layout).then(scaffold => {
293-
splited = yfmSplit(scaffold);
294-
const jsonMode = splited.separator.startsWith(';');
293+
splitted = yfmSplit(scaffold);
294+
const jsonMode = splitted.separator.startsWith(';');
295295
const frontMatter = prepareFrontMatter({ ...data }, jsonMode);
296296

297-
return tag.render(splited.data, frontMatter);
297+
return tag.render(splitted.data, frontMatter);
298298
}).then(frontMatter => {
299-
const { separator } = splited;
299+
const { separator } = splitted;
300300
const jsonMode = separator.startsWith(';');
301301

302302
// Parse front-matter
@@ -310,14 +310,14 @@ class Post {
310310

311311
let content = '';
312312
// Prepend the separator
313-
if (splited.prefixSeparator) content += `${separator}\n`;
313+
if (splitted.prefixSeparator) content += `${separator}\n`;
314314

315315
content += yfmStringify(obj, {
316316
mode: jsonMode ? 'json' : ''
317317
});
318318

319319
// Concat content
320-
content += splited.content;
320+
content += splitted.content;
321321

322322
if (data.content) {
323323
content += `\n${data.content}`;

lib/plugins/helper/paginator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const showAll = (tags, options, ctx) => {
3434
}
3535
};
3636

37-
const pagenasionPartShow = (tags, options, ctx) => {
37+
const paginationPartShow = (tags, options, ctx) => {
3838
const {
3939
current,
4040
total,
@@ -156,7 +156,7 @@ function paginatorHelper(options: Options = {}) {
156156
if (options.show_all) {
157157
showAll(tags, options, this);
158158
} else {
159-
pagenasionPartShow(tags, options, this);
159+
paginationPartShow(tags, options, this);
160160
}
161161

162162
// Display the link to the next page

lib/plugins/renderer/nunjucks.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import nunjucks from 'nunjucks';
32
import { readFileSync } from 'hexo-fs';
43
import { dirname } from 'path';

0 commit comments

Comments
 (0)