From a6b317ac7fbc95b8584056b3cebffbf9d1bba2c6 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 26 Jul 2022 16:37:13 +0200 Subject: Refactor to drastically improve perf around whitespace --- src/construct/partial_data.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/construct/partial_data.rs') diff --git a/src/construct/partial_data.rs b/src/construct/partial_data.rs index 86492b5..4216276 100644 --- a/src/construct/partial_data.rs +++ b/src/construct/partial_data.rs @@ -41,7 +41,7 @@ fn at_break(tokenizer: &mut Tokenizer, stop: &'static [Code]) -> State { State::Fn(Box::new(move |t| at_break(t, stop))) } _ if stop.contains(&tokenizer.current) => { - tokenizer.register_resolver("data".to_string(), Box::new(resolve_data)); + tokenizer.register_resolver_before("data".to_string(), Box::new(resolve_data)); State::Ok } _ => { -- cgit