We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf06818 commit 94257d5Copy full SHA for 94257d5
src/renderer.rs
@@ -152,11 +152,11 @@ where
152
/// Reserve unused color code
153
fn reserve_color_code(source: &str) -> io::Result<u32> {
154
lazy_static! {
155
- static ref LOWERCASE_COLOR_CODES: Regex = Regex::new(r##""#[0-9a-fA-F]{6}""##).unwrap();
+ static ref COLOR_CODES: Regex = Regex::new(r##""#[0-9a-fA-F]{6}""##).unwrap();
156
}
157
158
// Reserve one free hexadecimal color code
159
- let color_codes: BinaryHeap<u32> = LOWERCASE_COLOR_CODES
+ let color_codes: BinaryHeap<u32> = COLOR_CODES
160
.find_iter(source)
161
.map(|m| u32::from_str_radix(m.as_str().trim_matches(['"', '#']), 16))
162
.chain(iter::once(Ok(0))) // add plain black in case no color codes are found
0 commit comments