Scroll to navigation

YAML::Tidy(3) User Contributed Perl Documentation YAML::Tidy(3)

NAME

YAML::Tidy - Tidy YAML files

SYNOPSIS

    % cat in.yaml
    a: # a comment
        b:
         c: d
    % yamltidy in.yaml
    a: # a comment
      b:
        c: d

For documentation see <https://github.com/perlpunk/yamltidy>

For examples see <https://perlpunk.github.io/yamltidy>

DESCRIPTION

yamltidy can automatically tidy formatting in your YAML files, for example adjust indentation and remove trailing spaces.

For more information, see <https://github.com/perlpunk/yamltidy>.

METHODS

"new"
    my $yt = YAML::Tidy->new;
    
"tidy"
    my $outyaml = $yt->tidy($inyaml);
    
"highlight"
    my $ansicolored = $yt->highlight($yaml, 'ansi');
    my $html = $yt->highlight($yaml, 'html');
    
"cfg"
    my $cfg = $yt->cfg;
    

Return YAML::Tidy::Config

AUTHOR

Tina Müller <tinita@cpan.org>

SEE ALSO

https://yamllint.readthedocs.io/en/stable/>
<https://github.com/yaml/libyaml>
<https://www.yaml.info/>

COPYRIGHT AND LICENSE

Copyright 2020 by Tina Müller

This library is free software and may be distributed under the same terms as perl itself.

2022-08-07 perl v5.26.1