summaryrefslogtreecommitdiff
path: root/localsvgtidy
diff options
context:
space:
mode:
Diffstat (limited to 'localsvgtidy')
-rwxr-xr-xlocalsvgtidy10
1 files changed, 7 insertions, 3 deletions
diff --git a/localsvgtidy b/localsvgtidy
index 81021b0..507994f 100755
--- a/localsvgtidy
+++ b/localsvgtidy
@@ -19,7 +19,6 @@
# Depends: libxml-twig-perl
#
# TODO: Apply (the equivalent of) python-scour
-# TODO: Use TAB for indentation
use warnings;
use strict;
@@ -29,8 +28,13 @@ use XML::Twig;
my $twig = XML::Twig->new(
keep_encoding => 1,
keep_atts_order => 1,
- pretty_print => 'cvs',
- );
+ pretty_print => 'indented',
+ twig_handlers => {
+ _all_ => sub { $_[0]->flush; },
+ }
+);
+
+$twig->set_indent("\t");
if ( my $file= $ARGV[0] ) {
$twig->parsefile( $file);