Fix generated HTML for entity test
- Remove stray elements: </td> - Add missing elements: <tr></tr> - Add link to show where to get qjs from
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
//Usage: qjs --std entity.js [test/tab] > outfile
|
// Usage: qjs --std entity.js [test/tab] > outfile
|
||||||
|
// See: https://github.com/bellard/quickjs
|
||||||
|
|
||||||
const a = getEntities();
|
const a = getEntities();
|
||||||
|
|
||||||
@@ -15,9 +16,9 @@ function gentable(criteria, item) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function gentestitem(b, c, d) {
|
function gentestitem(b, c, d) {
|
||||||
let ha = "0x" + d[0].toString(16).toUpperCase() + "</td>";
|
let ha = "0x" + d[0].toString(16).toUpperCase();
|
||||||
if (d.length == 2)
|
if (d.length == 2)
|
||||||
var hb = "0x" + d[1].toString(16).toUpperCase() + "</td>";
|
var hb = "0x" + d[1].toString(16).toUpperCase();
|
||||||
else
|
else
|
||||||
var hb = "";
|
var hb = "";
|
||||||
console.log(" <tr>");
|
console.log(" <tr>");
|
||||||
@@ -54,19 +55,19 @@ function gentest() {
|
|||||||
console.log(" <tr>");
|
console.log(" <tr>");
|
||||||
console.log(" " +
|
console.log(" " +
|
||||||
"<th>Name</th><th>Hex 1</th><th>Hex 2</th><th>Hex result</th><th>Name result</th><th>Byte result</th>");
|
"<th>Name</th><th>Hex 1</th><th>Hex 2</th><th>Hex result</th><th>Name result</th><th>Byte result</th>");
|
||||||
console.log(" </th>");
|
console.log(" </tr>");
|
||||||
|
|
||||||
gentable((b, d) => d.length == 1 && b[b.length - 1] == ';', gentestitem);
|
gentable((b, d) => d.length == 1 && b[b.length - 1] == ';', gentestitem);
|
||||||
|
|
||||||
console.log("<th><hr></th><th><hr></th><th><hr></th><th><hr></th><th><hr></th><th><hr></th>");
|
console.log("<tr><th><hr></th><th><hr></th><th><hr></th><th><hr></th><th><hr></th><th><hr></th></tr>");
|
||||||
|
|
||||||
gentable((b, d) => d.length == 1 && b[b.length - 1] != ';', gentestitem);
|
gentable((b, d) => d.length == 1 && b[b.length - 1] != ';', gentestitem);
|
||||||
|
|
||||||
console.log("<th><hr></th><th><hr></th><th><hr></th><th><hr></th><th><hr></th><th><hr></th>");
|
console.log("<tr><th><hr></th><th><hr></th><th><hr></th><th><hr></th><th><hr></th><th><hr></th></tr>");
|
||||||
|
|
||||||
gentable((b, d) => d.length == 2 && b[b.length - 1] == ';', gentestitem);
|
gentable((b, d) => d.length == 2 && b[b.length - 1] == ';', gentestitem);
|
||||||
|
|
||||||
console.log("<th><hr></th><th><hr></th><th><hr></th><th><hr></th><th><hr></th><th><hr></th>");
|
console.log("<tr><th><hr></th><th><hr></th><th><hr></th><th><hr></th><th><hr></th><th><hr></th></tr>");
|
||||||
|
|
||||||
gentable((b, d) => d.length == 2 && b[b.length - 1] != ';', gentestitem);
|
gentable((b, d) => d.length == 2 && b[b.length - 1] != ';', gentestitem);
|
||||||
|
|
||||||
|
|||||||
+2235
-2235
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user