We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b7f1f8 commit 36a53ddCopy full SHA for 36a53dd
1 file changed
crates/vm/src/buffer.rs
@@ -228,6 +228,11 @@ impl FormatCode {
228
let mut arg_count = 0usize;
229
let mut codes = vec![];
230
while chars.peek().is_some() {
231
+ // Skip whitespace before repeat count or format char
232
+ while let Some(b' ' | b'\t' | b'\n' | b'\r') = chars.peek() {
233
+ chars.next();
234
+ }
235
+
236
// determine repeat operator:
237
let repeat = match chars.peek() {
238
Some(b'0'..=b'9') => {
@@ -246,11 +251,6 @@ impl FormatCode {
246
251
_ => 1,
247
252
};
248
253
249
- // Skip whitespace (Python ignores whitespace in format strings)
250
- while let Some(b' ' | b'\t' | b'\n' | b'\r') = chars.peek() {
- chars.next();
- }
-
254
// determine format char:
255
let c = match chars.next() {
256
Some(c) => c,
0 commit comments