Skip to content

Commit 3582de0

Browse files
authored
Parentheticals -> parentheses (#17130)
1 parent 91285a2 commit 3582de0

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// prevent `[foo] (bar)` strings with a space between from being interpreted as markdown links
22
// by encoding the space character
33

4-
module.exports = function encodeBracketedParentheticals (input) {
4+
module.exports = function encodeBracketedParentheses (input) {
55
return input.replace(/] \(/g, '] (')
66
}

lib/page.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const getMapTopicContent = require('./get-map-topic-content')
77
const rewriteAssetPathsToS3 = require('./rewrite-asset-paths-to-s3')
88
const rewriteLocalLinks = require('./rewrite-local-links')
99
const getApplicableVersions = require('./get-applicable-versions')
10-
const encodeBracketedParentheticals = require('./encode-bracketed-parentheticals')
10+
const encodeBracketedParentheses = require('./encode-bracketed-parentheses')
1111
const generateRedirectsForPermalinks = require('./redirects/permalinks')
1212
const getEnglishHeadings = require('./get-english-headings')
1313
const useEnglishHeadings = require('./use-english-headings')
@@ -69,7 +69,7 @@ class Page {
6969
this.markdown = content
7070

7171
// prevent `[foo] (bar)` strings with a space between from being interpreted as markdown links
72-
this.markdown = encodeBracketedParentheticals(this.markdown)
72+
this.markdown = encodeBracketedParentheses(this.markdown)
7373

7474
Object.assign(this, data)
7575

lib/site-data.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ const flat = require('flat')
33
const { get, set } = require('lodash')
44
const languages = require('./languages')
55
const dataDirectory = require('./data-directory')
6-
const encodeBracketedParentheticals = require('./encode-bracketed-parentheticals')
6+
const encodeBracketedParentheses = require('./encode-bracketed-parentheses')
77

88
const loadSiteDataFromDir = dir => ({
99
site: {
1010
data: dataDirectory(path.join(dir, 'data'), {
1111
preprocess: dataString =>
12-
encodeBracketedParentheticals(dataString.trimEnd()),
12+
encodeBracketedParentheses(dataString.trimEnd()),
1313
ignorePatterns: [/README\.md$/]
1414
})
1515
}

tests/content/site-data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('siteData module (English)', () => {
7575
expect(reusable.includes('1. ')).toBe(true)
7676
})
7777

78-
test.skip('encodes bracketed parentheticals to prevent them from becoming links', async () => {
78+
test.skip('encodes bracketed parentheses to prevent them from becoming links', async () => {
7979
const reusable = get(data, 'ja.site.data.reusables.organizations.team_name')
8080
const expectation = `reusable should contain a bracket followed by a space. Actual value: ${reusable}`
8181
expect(reusable.includes('] ('), expectation).toBe(true)

0 commit comments

Comments
 (0)