mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-25 18:41:05 -05:00
fix(parser): Go ahead and do lower UUIDs
I need this for hash support anyways
This commit is contained in:
parent
85082cdbb1
commit
8566b31f7b
1 changed files with 10 additions and 5 deletions
|
@ -234,15 +234,15 @@ mod parser {
|
||||||
<T as nom::InputIter>::Item: AsChar + Copy,
|
<T as nom::InputIter>::Item: AsChar + Copy,
|
||||||
{
|
{
|
||||||
recognize(tuple((
|
recognize(tuple((
|
||||||
take_while_m_n(8, 8, AsChar::is_hex_digit),
|
take_while_m_n(8, 8, is_lower_hex_digit),
|
||||||
char('-'),
|
char('-'),
|
||||||
take_while_m_n(4, 4, AsChar::is_hex_digit),
|
take_while_m_n(4, 4, is_lower_hex_digit),
|
||||||
char('-'),
|
char('-'),
|
||||||
take_while_m_n(4, 4, AsChar::is_hex_digit),
|
take_while_m_n(4, 4, is_lower_hex_digit),
|
||||||
char('-'),
|
char('-'),
|
||||||
take_while_m_n(4, 4, AsChar::is_hex_digit),
|
take_while_m_n(4, 4, is_lower_hex_digit),
|
||||||
char('-'),
|
char('-'),
|
||||||
take_while_m_n(12, 12, AsChar::is_hex_digit),
|
take_while_m_n(12, 12, is_lower_hex_digit),
|
||||||
)))(input)
|
)))(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,6 +287,11 @@ mod parser {
|
||||||
i.is_hex_digit() || is_digit_sep(i.as_char())
|
i.is_hex_digit() || is_digit_sep(i.as_char())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn is_lower_hex_digit(i: impl AsChar + Copy) -> bool {
|
||||||
|
let c = i.as_char();
|
||||||
|
('a'..='f').contains(&c) || ('0'..='9').contains(&c)
|
||||||
|
}
|
||||||
|
|
||||||
fn is_xid_continue(i: impl AsChar + Copy) -> bool {
|
fn is_xid_continue(i: impl AsChar + Copy) -> bool {
|
||||||
let c = i.as_char();
|
let c = i.as_char();
|
||||||
unicode_xid::UnicodeXID::is_xid_continue(c)
|
unicode_xid::UnicodeXID::is_xid_continue(c)
|
||||||
|
|
Loading…
Reference in a new issue