Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export const listFirstWordCapitalization = {
if (firstWord.startsWith('[{%') || firstWord.startsWith('{%') || firstWord.startsWith('{{'))
return
// If the first letter is capitalized, it's not an error
if (/[A-Z]/.test(firstWord[0])) return
// And any special characters (like @) that can't be capitalized
if (/[A-Z@]/.test(firstWord[0])) return
// There are items that start with a number or words that contain numbers
// e.g., x64
if (/\d/.test(firstWord)) return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ describe(listFirstWordCapitalization.names.join(' - '), () => {
'- {% data variables.product.prodname_dotcom_the_website %} Services Continuity and Incident Management Plan',
'- {% data variables.product.prodname_dotcom_the_website %} Services Continuity and Incident Management Plan',
'- x64',
'- @mention your friends',
'- @hash tags',
'- 05:00',
].join('\n')
const result = await runRule(listFirstWordCapitalization, { strings: { markdown } })
Expand Down