diff --git a/tests/testament/htmlgen.nim b/tests/testament/htmlgen.nim index 6e3865bab6..4abcacbd4a 100644 --- a/tests/testament/htmlgen.nim +++ b/tests/testament/htmlgen.nim @@ -71,6 +71,16 @@ div.tabContent.hide { display: none; } i++; } } + + function getFirstChildWithTagName( element, tagName ) { + for ( var i = 0; i < element.childNodes.length; i++ ) { + if ( element.childNodes[i].nodeName == tagName ) return element.childNodes[i]; + } + } + function getHash( url ) { + var hashPos = url.lastIndexOf ( '#' ); + return url.substring( hashPos + 1 ); + } @@ -100,7 +110,8 @@ proc generateHtml*(filename: string) = outfile.write("""") - for lastCommit in db.getRow(sql"select id from [Commit] order by id desc"): + for thisCommit in db.rows(sql"select id from [Commit] order by id desc"): + let lastCommit = thisCommit[0] outfile.write("""
""" % lastCommit) outfile.write(TableHeader)