Nicer line continuation
authorJamie Cameron <jcameron@webmin.com>
Wed, 14 Jan 2009 01:46:19 +0000 (01:46 +0000)
committerJamie Cameron <jcameron@webmin.com>
Wed, 14 Jan 2009 01:46:19 +0000 (01:46 +0000)
smart-status/smart-status-lib.pl

index 9b40086..8e5eab2 100644 (file)
@@ -206,7 +206,14 @@ if ($config{'attribs'}) {
                        }
                elsif (/^\s+(\S.*)/ && @attribs && !$doneknown) {
                        # Continuation of a known attribute description
-                       $attribs[$#attribs]->[2] .= "<br>".$1;
+                       local $cont = $1;
+                       local $ls = $attribs[$#attribs];
+                       if ($ls->[2] =~ /\.\s*$/) {
+                               $ls->[2] .= "<br>".$cont;
+                               }
+                       else {
+                               $ls->[2] .= " ".$cont;
+                               }
                        }
                elsif (/ATA\s+Error\s+Count:\s+(\d+)/i) {
                        # An error line!