diff options
Diffstat (limited to 'support/latexindent/LatexIndent')
-rw-r--r-- | support/latexindent/LatexIndent/GetYamlSettings.pm | 3 | ||||
-rw-r--r-- | support/latexindent/LatexIndent/Version.pm | 4 | ||||
-rw-r--r-- | support/latexindent/LatexIndent/Wrap.pm | 7 |
3 files changed, 12 insertions, 2 deletions
diff --git a/support/latexindent/LatexIndent/GetYamlSettings.pm b/support/latexindent/LatexIndent/GetYamlSettings.pm index 6365e0fd93..cbea5437c6 100644 --- a/support/latexindent/LatexIndent/GetYamlSettings.pm +++ b/support/latexindent/LatexIndent/GetYamlSettings.pm @@ -749,6 +749,9 @@ sub yaml_read_settings { my $parent = $keysValues[0]; my $child = $keysValues[1]; my $grandchild = $keysValues[2]; + + delete $mainSettings{$parent}{$child} if (defined $mainSettings{$parent}{$child} and ref $mainSettings{$parent}{$child} ne "HASH" ); + $logger->info("Updating mainSettings with $parent: $child: $grandchild: $value"); $mainSettings{$parent}{$child}{$grandchild} = $value; } diff --git a/support/latexindent/LatexIndent/Version.pm b/support/latexindent/LatexIndent/Version.pm index 5232967fb9..039d492356 100644 --- a/support/latexindent/LatexIndent/Version.pm +++ b/support/latexindent/LatexIndent/Version.pm @@ -20,6 +20,6 @@ use warnings; use Exporter qw/import/; our @EXPORT_OK = qw/$versionNumber $versionDate/; -our $versionNumber = '3.24.2'; -our $versionDate = '2024-06-15'; +our $versionNumber = '3.24.4'; +our $versionDate = '2024-07-18'; 1 diff --git a/support/latexindent/LatexIndent/Wrap.pm b/support/latexindent/LatexIndent/Wrap.pm index 334902dc66..1116b05fa8 100644 --- a/support/latexindent/LatexIndent/Wrap.pm +++ b/support/latexindent/LatexIndent/Wrap.pm @@ -659,6 +659,13 @@ sub text_wrap_comment_blocks { # call the text wrapping routine my $columns = ${ $mainSettings{modifyLineBreaks}{textWrapOptions} }{columns}; + # fail gracefully if columns == 0 + if ($columns==0){ + $logger->warn("* textWrapOptions: columns is set to 0, can't text wrap with this"); + ${ ${ $mainSettings{modifyLineBreaks}{textWrapOptions} }{comments} }{wrap} = 0; + return; + } + # # text wrap comment blocks # |