Skip to content

Commit 4e781a5

Browse files
heiskrchiedo
andauthored
Fix some typos in the lib directory (#17131)
Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
1 parent dc36539 commit 4e781a5

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

lib/algolia/parse-page-sections-into-records.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This module takes cheerio page object and divides it into sections
22
// using H1,h2,h3 heading elements as section delimiters. The text
3-
// that follows each heading becomes the content of the searh record.
3+
// that follows each heading becomes the content of the search record.
44

55
const { chain } = require('lodash')
66
const urlPrefix = 'https://docs.github.com'

lib/algolia/sync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = async function syncAlgoliaIndices (opts = {}) {
4646

4747
console.log(`Building indices for ${opts.language || 'all languages'} and ${opts.version || 'all versions'}.\n`)
4848

49-
// Exlude WIP pages, hidden pages, index pages, etc
49+
// Exclude WIP pages, hidden pages, index pages, etc
5050
const indexablePages = await findIndexablePages()
5151

5252
// Build and validate all indices

lib/get-applicable-versions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function getApplicableVersions (frontmatterVersions, filepath) {
2020
// enterprise-server: '>=2.19'
2121
// enterprise-cloud: '*'
2222
// private-instances: '*'
23-
// ^ where each key correponds to a plan
23+
// ^ where each key corresponds to a plan
2424
Object.entries(frontmatterVersions)
2525
.forEach(([plan, planValue]) => {
2626
// for each plan (e.g., enterprise-server), get matching versions from allVersions object

lib/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Page {
5757
this.raw = this.raw.replace(': verdadero', ': true')
5858
}
5959

60-
// parse fronmatter and save any errors for validation in the test suite
60+
// parse frontmatter and save any errors for validation in the test suite
6161
const { content, data, errors: frontmatterErrors } = frontmatter(this.raw, { filepath: this.fullPath })
6262
this.frontmatterErrors = frontmatterErrors
6363

lib/redirects/get-old-paths-from-permalink.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = function getOldPathsFromPath (currentPath, languageCode, curren
4242
.replace(`/enterprise/${latest}`, '/enterprise'))
4343

4444
// create old path /enterprise/foo from current path /enterprise/user/foo
45-
// this supports old developer paths like /enteprise/webhooks with no /user in them
45+
// this supports old developer paths like /enterprise/webhooks with no /user in them
4646
if (currentPath.includes('/enterprise/')) {
4747
oldPaths.add(currentPath
4848
.replace('/user/', '/'))

lib/redirects/permalinks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = function generateRedirectsForPermalinks (permalinks, redirectFr
4848
})
4949
})
5050

51-
// filter for uniqe entries only
51+
// filter for unique entries only
5252
Object.entries(redirects).forEach(([oldPath, newPath]) => {
5353
if (oldPath === newPath) delete redirects[oldPath]
5454
})

lib/redirects/precompile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = function precompileRedirects (pageList, pageMap) {
6161
}
6262

6363
// given a developer route like `/enterprise/2.19/v3/activity`,
64-
// add a veriation like `/enterprise/2.19/user/v3/activity`;
64+
// add a variation like `/enterprise/2.19/user/v3/activity`;
6565
// we need to do this because all links in content get rewritten
6666
// by lib/rewrite-local-links to include `/user`
6767
if (developerRoute.includes('/enterprise/')) {
@@ -72,7 +72,7 @@ module.exports = function precompileRedirects (pageList, pageMap) {
7272
}
7373

7474
// given a developer route like `/v3/gists/comments`,
75-
// add a veriation like `/free-pro-team@latest/v3/gists/comments`;
75+
// add a variation like `/free-pro-team@latest/v3/gists/comments`;
7676
// again, we need to do this because all links in content get rewritten
7777
if (!developerRoute.startsWith('/enterprise/')) {
7878
const developerRouteWithVersion = slash(path.join(nonEnterpriseDefaultVersion, developerRoute))

0 commit comments

Comments
 (0)