1
Fork 0
mirror of https://github.com/RGBCube/cstree synced 2025-07-27 09:07:44 +00:00

restore SyntaxToken debug output if token text is truncated

This commit is contained in:
DQ 2021-09-09 12:08:48 +02:00 committed by GitHub
parent 497719770d
commit 62ec2a0843
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,8 @@ impl<L: Language, D> SyntaxToken<L, D> {
for idx in 21..25 { for idx in 21..25 {
if text.is_char_boundary(idx) { if text.is_char_boundary(idx) {
return write!(target, r#" "{} ...""#, &text[..idx]); let text = format!("{} ...", &text[..idx]);
return write!(target, " {:?}", text);
} }
} }
unreachable!() unreachable!()