From b673b81146720c37a1dfeca9b7018e82544ce242 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 29 Jun 2021 13:55:46 -0500 Subject: [PATCH] fix(parser): Ensure we get full base64 We greedily matched separators, including ones that might be part of base64. This impacts the length calculation, so we want as much as possible. --- crates/typos/src/tokens.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typos/src/tokens.rs b/crates/typos/src/tokens.rs index 02c5429..85d0c31 100644 --- a/crates/typos/src/tokens.rs +++ b/crates/typos/src/tokens.rs @@ -180,13 +180,13 @@ mod parser { ::Item: AsChar + Copy, { take_many0(alt(( - sep1, terminated(uuid_literal, sep1), terminated(hash_literal, sep1), terminated(hex_literal, sep1), terminated(dec_literal, sep1), terminated(base64_literal, sep1), terminated(email_literal, sep1), + sep1, )))(input) }