diff --git a/Sources/HTMLStreamer/Tokenizer.swift b/Sources/HTMLStreamer/Tokenizer.swift
index cc90048..23843cf 100644
--- a/Sources/HTMLStreamer/Tokenizer.swift
+++ b/Sources/HTMLStreamer/Tokenizer.swift
@@ -1555,12 +1555,12 @@ private extension Unicode.Scalar {
case "7": 7
case "8": 8
case "9": 9
- case "A": 0xA
- case "B": 0xB
- case "C": 0xC
- case "D": 0xD
- case "E": 0xE
- case "F": 0xF
+ case "A", "a": 0xA
+ case "B", "b": 0xB
+ case "C", "c": 0xC
+ case "D", "d": 0xD
+ case "E", "e": 0xE
+ case "F", "f": 0xF
default: nil
}
}
diff --git a/Tests/HTMLStreamerTests/TokenizerTests.swift b/Tests/HTMLStreamerTests/TokenizerTests.swift
index 47c6935..4674f89 100644
--- a/Tests/HTMLStreamerTests/TokenizerTests.swift
+++ b/Tests/HTMLStreamerTests/TokenizerTests.swift
@@ -33,6 +33,8 @@ final class TokenizerTests: XCTestCase {
func testNumericCharacterReference() {
XCTAssertEqual(tokenize("!"), [.characterSequence("!")])
XCTAssertEqual(tokenize("!"), [.characterSequence("!")])
+ XCTAssertEqual(tokenize("J"), [.characterSequence("J")])
+ XCTAssertEqual(tokenize("J"), [.characterSequence("J")])
}
func testStartTag() {