diff mbox series

[v2,1/5] docparse: Move CVE and git link into Info column

Message ID 20210504190240.24250-2-pvorel@suse.cz
State Accepted
Headers show
Series docparser formatting improvements | expand

Commit Message

Petr Vorel May 4, 2021, 7:02 p.m. UTC
Previously it was in Tags column (1st row), which is a bit confusing.

Also texts in 1st column will be made clickable too, pointing to the
section with tests with this key/tag.

Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 docparse/testinfo.pl | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Comments

Cyril Hrubis May 7, 2021, 2:28 p.m. UTC | #1
Hi!
Looks good to me, thanks for fixing this.

Acked-by: Cyril Hrubis <chrubis@suse.cz>
diff mbox series

Patch

diff --git a/docparse/testinfo.pl b/docparse/testinfo.pl
index ccce67be4..7c74009d7 100755
--- a/docparse/testinfo.pl
+++ b/docparse/testinfo.pl
@@ -391,22 +391,19 @@  sub content_all_tests
 			}
 			my $k = @$tag[0];
 			my $v = @$tag[1];
-			my $text = $k;
 
 			if (defined($$git_url{$k})) {
-				$text .= "-$v";
-
 				$commits{$k} = () unless (defined($commits{$k}));
 				unless (defined($commits{$k}{$v})) {
 					chdir($$git_url{$k});
 					$commits{$k}{$v} = `git log --pretty=format:'%s' -1 $v`;
 					chdir(OUTDIR);
 				}
-				$v = $commits{$k}{$v};
+				$v .= ' ("' . $commits{$k}{$v} . '")';
 			}
 
-			my $a = html_a(tag_url($k, @$tag[1]), $text);
-			$content .= "\n|$a\n|$v\n";
+			$v = html_a(tag_url($k, @$tag[1]), $v);
+			$content .= "\n|$k\n|$v\n";
 			$tmp2 = 1;
 		}
 		if (defined($tmp2)) {