Link-ify the git commit in test results

This commit is contained in:
baldurk
2019-05-24 11:52:54 +01:00
parent a856b6ebbe
commit 786d6c84af
+5 -1
View File
@@ -73,13 +73,17 @@ document.body.onload = function() {
if(m) {
if(m[1] == '##') {
title = m[2].replace(/ ##$/, '');
html += '<h1>' + title + '</h1>';
var hash = m[2].match(/Version ([0-9.]*) \(([a-f0-9]*)\)/);
if(hash) {
document.title = title;
commit = hash[2];
}
title = title.replace(commit, '<a href="https://github.com/baldurk/renderdoc/commit/' + commit + '">' + commit.substr(0, 8) + '</a>');
html += '<h1>' + title + '</h1>';
} else if(m[1] == '//') {
// comments, skip
} else if(m[1] == '..') {