Add support for uppercase hex template number formatting as well as lowercase

This commit is contained in:
John BoWeRs 2022-01-04 12:43:14 -07:00
parent 1380655747
commit 1852c79ba4

View File

@ -140,7 +140,7 @@ public final class UrlTemplate {
// Allowed conversions are decimal integer (which is the only conversion allowed by the // Allowed conversions are decimal integer (which is the only conversion allowed by the
// DASH specification) and hexadecimal integer (due to existing content that uses it). // DASH specification) and hexadecimal integer (due to existing content that uses it).
// Else we assume that the conversion is missing, and that it should be decimal integer. // Else we assume that the conversion is missing, and that it should be decimal integer.
if (!formatTag.endsWith("d") && !formatTag.endsWith("x")) { if (!formatTag.endsWith("d") && !formatTag.endsWith("x") && !formatTag.endsWith("X")) {
formatTag += "d"; formatTag += "d";
} }
identifier = identifier.substring(0, formatTagIndex); identifier = identifier.substring(0, formatTagIndex);