mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
etc: Modernize the indenter
This commit is contained in:
parent
35a93e61d4
commit
f9eca218e1
@ -1,6 +1,8 @@
|
||||
#!/usr/bin/perl -w
|
||||
#!/usr/bin/perl
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
$indent = 0;
|
||||
my $indent = 0;
|
||||
while (<>) {
|
||||
if (/^rust: ">>/) {
|
||||
$indent += 1;
|
||||
@ -8,10 +10,6 @@ while (<>) {
|
||||
$indent -= 1;
|
||||
}
|
||||
|
||||
printf "%03d ", $indent;
|
||||
for ($i = 0; $i < $indent; $i++) {
|
||||
printf(" ");
|
||||
}
|
||||
print;
|
||||
printf "%03d %s%s", $indent, (" " x $indent), $_;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user