mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-01 00:02:00 +08:00
fish_indent: Don't panic for gap text
It should be fine to just write the space out here. This one triggered by `echo b\|\{ | ./fish_indent`
This commit is contained in:
parent
ed251578d1
commit
445406d251
|
@ -446,8 +446,9 @@ impl<'source, 'ast> PrettyPrinterState<'source, 'ast> {
|
|||
self.emit_newline();
|
||||
}
|
||||
} else {
|
||||
panic!("Gap text should only have comments and newlines - instead found token type {:?} with text: {}",
|
||||
tok.type_, tok_text);
|
||||
// Anything else we write a space.
|
||||
self.emit_space_or_indent(GapFlags::default());
|
||||
self.output.push_utfstr(tok_text);
|
||||
}
|
||||
}
|
||||
if needs_nl {
|
||||
|
|
Loading…
Reference in New Issue
Block a user