Skip to content

Commit

Permalink
Skip leading lower case characters
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 690968116
  • Loading branch information
lukesandberg authored and copybara-github committed Oct 29, 2024
1 parent e8315b7 commit 27d6e97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion java/src/com/google/template/soy/data/SanitizedContent.java
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,8 @@ private static String consumeAttributeName(String content, int position, int len
// passes in the common case of no upper case characters.
char[] chars = new char[position - start];
content.getChars(start, position, chars, 0);
for (int i = 0; i < chars.length; i++) {
// Start at the first upper case character and convert the rest to lower case.
for (int i = upperCaseStartPos - start; i < chars.length; i++) {
chars[i] = Ascii.toLowerCase(chars[i]);
}
return String.valueOf(chars);
Expand Down

0 comments on commit 27d6e97

Please sign in to comment.