]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
viewvcs: close the <pre> tag if no query is extracted
authorEric Wong <e@80x24.org>
Wed, 2 Oct 2024 22:39:00 +0000 (22:39 +0000)
committerEric Wong <e@80x24.org>
Mon, 7 Oct 2024 08:22:22 +0000 (08:22 +0000)
In the odd case we get a patch with no valid query and
no commit title, we still need to close the <pre> tag
we started.

lib/PublicInbox/ViewVCS.pm

index 14c2e4e3d5c7887a5709a19bb19c9a281049d4fd..a29789fdd646372be382260301293cdfc926b2dc 100644 (file)
@@ -291,6 +291,7 @@ EOM
                # TODO: should there be another textarea which attempts to
                # search for the exact email which was applied to make this
                # commit?
+               print $zfh '</pre>';
                my ($rows, $q) = PublicInbox::View::dfqry_text $ctx, $s;
                if ($rows) {
                        my $ibx_url = ibx_url_for($ctx);
@@ -305,7 +306,7 @@ EOM
                                $alt = '';
                        }
                        print $zfh <<EOM;
-</pre><hr><form action="$ibx_url"
+<hr><form action="$ibx_url"
 id=related><pre>find related emails, including ancestors/descendants/conflicts
 <textarea name=q cols=${\PublicInbox::View::COLS} rows=$rows>$q</textarea>
 <input type=submit value="search$alt"