Skip to content

Commit

Permalink
Fix some typos in the lib directory (github#17131)
Browse files Browse the repository at this point in the history
Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
  • Loading branch information
heiskr and chiedo authored Jan 5, 2021
1 parent dc36539 commit 4e781a5
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/algolia/parse-page-sections-into-records.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This module takes cheerio page object and divides it into sections
// using H1,h2,h3 heading elements as section delimiters. The text
// that follows each heading becomes the content of the searh record.
// that follows each heading becomes the content of the search record.

const { chain } = require('lodash')
const urlPrefix = 'https://docs.github.com'
Expand Down
2 changes: 1 addition & 1 deletion lib/algolia/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = async function syncAlgoliaIndices (opts = {}) {

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

// Exlude WIP pages, hidden pages, index pages, etc
// Exclude WIP pages, hidden pages, index pages, etc
const indexablePages = await findIndexablePages()

// Build and validate all indices
Expand Down
2 changes: 1 addition & 1 deletion lib/get-applicable-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function getApplicableVersions (frontmatterVersions, filepath) {
// enterprise-server: '>=2.19'
// enterprise-cloud: '*'
// private-instances: '*'
// ^ where each key correponds to a plan
// ^ where each key corresponds to a plan
Object.entries(frontmatterVersions)
.forEach(([plan, planValue]) => {
// for each plan (e.g., enterprise-server), get matching versions from allVersions object
Expand Down
2 changes: 1 addition & 1 deletion lib/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Page {
this.raw = this.raw.replace(': verdadero', ': true')
}

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

Expand Down
2 changes: 1 addition & 1 deletion lib/redirects/get-old-paths-from-permalink.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = function getOldPathsFromPath (currentPath, languageCode, curren
.replace(`/enterprise/${latest}`, '/enterprise'))

// create old path /enterprise/foo from current path /enterprise/user/foo
// this supports old developer paths like /enteprise/webhooks with no /user in them
// this supports old developer paths like /enterprise/webhooks with no /user in them
if (currentPath.includes('/enterprise/')) {
oldPaths.add(currentPath
.replace('/user/', '/'))
Expand Down
2 changes: 1 addition & 1 deletion lib/redirects/permalinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = function generateRedirectsForPermalinks (permalinks, redirectFr
})
})

// filter for uniqe entries only
// filter for unique entries only
Object.entries(redirects).forEach(([oldPath, newPath]) => {
if (oldPath === newPath) delete redirects[oldPath]
})
Expand Down
4 changes: 2 additions & 2 deletions lib/redirects/precompile.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = function precompileRedirects (pageList, pageMap) {
}

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

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

0 comments on commit 4e781a5

Please sign in to comment.