Skip to content

Commit

Permalink
Fix the capitalization rule
Browse files Browse the repository at this point in the history
  • Loading branch information
grego952 committed Mar 18, 2024
1 parent 51407a5 commit 2b1fc08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion heading_capitalization.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = [{
var wordsInHeading = headingTokenContent.split(' ');

for (var i = 0; i < wordsInHeading.length; i++) {
if (wordsInHeading[i].length >= 4 && wordsInHeading[i] &&
if (wordsInHeading[i].length > 4 && wordsInHeading[i] &&
wordsInHeading[i].charAt(0) !== wordsInHeading[i].charAt(0).toUpperCase()) {
var capitalizedWord = wordsInHeading[i].charAt(0).toUpperCase() + wordsInHeading[i].slice(1);
var detailMessage = "Change " + "'" + wordsInHeading[i] + "'" + " to " + "'" + capitalizedWord + "'";
Expand Down

0 comments on commit 2b1fc08

Please sign in to comment.