From 1357aed71111bad7232e66a5e6545eb842c509fd Mon Sep 17 00:00:00 2001 From: LeeWannacott Date: Mon, 29 May 2023 23:07:15 +1200 Subject: [PATCH 1/5] Decouple thead from tbodies. --- public/table-sort.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/table-sort.js b/public/table-sort.js index a9a7e31..84a4b3d 100644 --- a/public/table-sort.js +++ b/public/table-sort.js @@ -114,21 +114,21 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) { rows: [], headers: [], }; + for (let index of table.theads.keys()) { + table.headers.push(table.theads.item(index).querySelectorAll("th")); + } for (let index of table.bodies.keys()) { if (table.bodies.item(index) == null) { return; } - table.headers.push(table.theads.item(index).querySelectorAll("th")); table.rows.push(table.bodies.item(index).querySelectorAll("tr")); } - table.hasClass = { noClassInfer: sortableTable.classList.contains("no-class-infer"), cellsSort: sortableTable.classList.contains("cells-sort"), tableArrows: sortableTable.classList.contains("table-arrows"), rememberSort: sortableTable.classList.contains("remember-sort"), }; - for ( let headerIndex = 0; headerIndex < table.theads.length; From e354eb5de66881b46659b5ccbea9d0687186ff46 Mon Sep 17 00:00:00 2001 From: LeeWannacott Date: Tue, 30 May 2023 00:11:11 +1200 Subject: [PATCH 2/5] Handle null error by using optional chaining and checking for ! undefined --- public/table-sort.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/table-sort.js b/public/table-sort.js index 84a4b3d..3475075 100644 --- a/public/table-sort.js +++ b/public/table-sort.js @@ -85,8 +85,8 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) { let foundMatch = false; for (let key of Object.keys(inferableClasses)) { let classRegexp = inferableClasses[key].regexp; - if (tableColumn.innerText) { - if (tableColumn.innerText.match(classRegexp) !== null) { + if (tableColumn?.innerText !== undefined) { + if (tableColumn.innerText.match(classRegexp)) { foundMatch = true; inferableClasses[key].count++; } From 2909d8ad7d58094ddc7b743fe854b64e6754d715 Mon Sep 17 00:00:00 2001 From: LeeWannacott Date: Tue, 30 May 2023 02:11:11 +1200 Subject: [PATCH 3/5] WIP fixed missing thead... --- public/index.html | 9 ++++----- public/table-sort.js | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/public/index.html b/public/index.html index 7ec7049..f9cc5c9 100644 --- a/public/index.html +++ b/public/index.html @@ -89,9 +89,8 @@

Testing table containing colspan and data-sort and multiple tbodies

On Our Dates First Sold Out - - + Comedy Show 1 @@ -161,7 +160,6 @@

Testing table containing colspan and data-sort and multiple tbodies

50% 2022-07-31 - Last Name @@ -174,7 +172,7 @@

Testing table containing colspan and data-sort and multiple tbodies

data-sort days dates in dd/mm/yyyy - + Franklin Benjamin @@ -230,6 +228,7 @@

Testing table containing colspan and data-sort and multiple tbodies

Monday 8/6/1978 + Last Name @@ -242,7 +241,7 @@

Testing table containing colspan and data-sort and multiple tbodies

data-sort days dates in dd/mm/yyyy - + Franklin Benjamin diff --git a/public/table-sort.js b/public/table-sort.js index 3475075..cd47d15 100644 --- a/public/table-sort.js +++ b/public/table-sort.js @@ -49,8 +49,8 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) { if (sortableTable.getElementsByTagName("thead").length === 0) { createMissingTableHead(sortableTable); if (sortableTable.querySelectorAll("tbody").length > 1) { - // Why index 1?; I don't remember - return sortableTable.querySelectorAll("tbody")[1]; + // don't select empty tbody that the browser creates + return sortableTable.querySelectorAll('tbody:not(:nth-child(2))'); } else { return sortableTable.querySelectorAll("tbody"); } From b9255565b80acbebfbcc3ca372dad43454f17736 Mon Sep 17 00:00:00 2001 From: LeeWannacott Date: Tue, 30 May 2023 15:59:03 +1200 Subject: [PATCH 4/5] change each col to have td property. --- test/order-by-desc.test.js | 40 ++++++------ test/table.js | 8 +-- test/table.test.js | 128 +++++++++++++++++++++---------------- 3 files changed, 96 insertions(+), 80 deletions(-) diff --git a/test/order-by-desc.test.js b/test/order-by-desc.test.js index 3ca78ee..4181949 100644 --- a/test/order-by-desc.test.js +++ b/test/order-by-desc.test.js @@ -3,7 +3,7 @@ const createTestTable = require("./table"); test("Alpha - Capitalized: order-by-desc", () => { expect( createTestTable( - { col0: ["Echo", "Alpha", "Bravo", "Charlie", "Delta"] }, + { col0: {td: ["Echo", "Alpha", "Bravo", "Charlie", "Delta"] }}, { classTags: "order-by-desc", } @@ -14,7 +14,7 @@ test("Alpha - Capitalized: order-by-desc", () => { test("Alpha - Lowercase: order-by-desc ", () => { expect( createTestTable( - { col0: ["echo", "alpha", "bravo", "charlie", "delta"] }, + { col0: {td: ["echo", "alpha", "bravo", "charlie", "delta"] }}, { classTags: "order-by-desc", } @@ -24,14 +24,14 @@ test("Alpha - Lowercase: order-by-desc ", () => { test("Numerical: order-by-desc", () => { expect( - createTestTable({ col0: [5, 3, 4, 1, 2] }, { classTags: "order-by-desc" }) + createTestTable({ col0: {td:[5, 3, 4, 1, 2] }}, { classTags: "order-by-desc" }) ).toStrictEqual({ col0: ["5", "4", "3", "2", "1"] }); }); test("Alphanumeric: order-by-desc", () => { expect( createTestTable( - { col0: ["Alpha1", "Echo5", "Bravo2", "Charlie3", "Delta4"] }, + { col0:{td: ["Alpha1", "Echo5", "Bravo2", "Charlie3", "Delta4"] }}, { classTags: "order-by-desc", } @@ -44,7 +44,7 @@ test("Alphanumeric: order-by-desc", () => { test("Dates: order-by-desc", () => { expect( createTestTable( - { col0: ["1979/9/6", "2008/4/9", "1879/12/16", "1978/4/6", "1978/4/16"] }, + { col0: {td: ["1979/9/6", "2008/4/9", "1879/12/16", "1978/4/6", "1978/4/16"] }}, { classTags: "order-by-desc" } ) ).toStrictEqual({ @@ -55,7 +55,7 @@ test("Dates: order-by-desc", () => { test("Money: order-by-desc", () => { expect( createTestTable( - { col0: ["$29", "$93", "$84", "$20", "$58"] }, + { col0: {td: ["$29", "$93", "$84", "$20", "$58"] }}, { classTags: "order-by-desc", } @@ -66,7 +66,7 @@ test("Money: order-by-desc", () => { test("Empty cells sort at the end: order-by-desc", () => { expect( createTestTable( - { col0: ["Echo", "", "Bravo", "", "Alpha"] }, + { col0: {td: ["Echo", "", "Bravo", "", "Alpha"] }}, { classTags: "order-by-desc", } @@ -78,7 +78,7 @@ test("Order by file-size: file-size order-by-desc", () => { expect( createTestTable( { - col0: [ + col0: {td:[ "10MB", "10GB", "10TB", @@ -89,7 +89,7 @@ test("Order by file-size: file-size order-by-desc", () => { "10KB", "10GiB", ], - }, + }}, { classTags: "order-by-desc file-size-sort" } ) ).toStrictEqual({ @@ -110,7 +110,7 @@ test("Order by file-size: file-size order-by-desc", () => { test("Floating point numbers: order-by-desc", () => { expect( createTestTable( - { col0: [6.23, 0.25, 3.15, 9.09, 0.35] }, + { col0: {td:[6.23, 0.25, 3.15, 9.09, 0.35] }}, { classTags: "order-by-desc", } @@ -121,7 +121,7 @@ test("Floating point numbers: order-by-desc", () => { test("Release Versions: order-by-desc", () => { expect( createTestTable( - { col0: ["4.0.1", "3.0.2", "4.1.0", "3.0.4", "4.2.0"] }, + { col0: {td: ["4.0.1", "3.0.2", "4.1.0", "3.0.4", "4.2.0"] }}, { classTags: "order-by-desc", } @@ -133,7 +133,7 @@ test("data-sort: example days of week - reversed", () => { expect( createTestTable( { - col0: [ + col0: {td:[ "Saturday", "Wednesday", "Sunday", @@ -142,7 +142,7 @@ test("data-sort: example days of week - reversed", () => { "Tuesday", "Monday", ], - }, + }}, { classTags: "data-sort order-by-desc" } ) ).toStrictEqual({ @@ -162,14 +162,14 @@ test("visible-tr-sort: example sort only visible trs", () => { expect( createTestTable( { - col0: [ + col0: {td:[ "row1", // invisible "row2", "row3", // invisible "row4", "row5", ], - }, + }}, { classTags: "order-by-desc" }, { invisibleIndex: [0, 2] } ) @@ -179,7 +179,7 @@ test("visible-tr-sort: example sort only visible trs", () => { test("onload-sort: testing that it sorts without a click from user", () => { expect( createTestTable( - { col0: [5, 3, 4, 1, 2] }, + { col0: {td: [5, 3, 4, 1, 2] }}, { classTags: "order-by-desc onload-sort" } ) ).toStrictEqual({ col0: ["5", "4", "3", "2", "1"] }); @@ -189,8 +189,8 @@ test("order-by-desc Remember-sort: Sorting cols without rememeber-sort class.", expect( createTestTable( { - col0: ["charlie", "alpha", "beta"], - col1: ["carrie", "doris", "fisher"], + col0: {td: ["charlie", "alpha", "beta"]}, + col1: {td: ["carrie", "doris", "fisher"]}, }, { classTags: "order-by-desc", @@ -210,8 +210,8 @@ test("order-by-desc Remember-sort: Sorting cols with rememeber-sort class.", () expect( createTestTable( { - col0: ["charlie", "alpha", "beta"], - col1: ["carrie", "doris", "fisher"], + col0: {td:["charlie", "alpha", "beta"]}, + col1: {td:["carrie", "doris", "fisher"]}, }, { classTags: "order-by-desc", diff --git a/test/table.js b/test/table.js index 0ce6eb3..c6e4b3c 100644 --- a/test/table.js +++ b/test/table.js @@ -19,11 +19,11 @@ function createTestTable( function getRowsOfTd(index, type) { let rowsOfTd = ""; for (let key in testTableData) { - if (testTableData[key]) { + if (testTableData[key].td) { if (type === "data-sort") { - rowsOfTd += `${testTableData[key][index]}`; + rowsOfTd += `${testTableData[key].td[index]}`; } else { - rowsOfTd += `${testTableData[key][index]}`; + rowsOfTd += `${testTableData[key].td[index]}`; } } } @@ -31,7 +31,7 @@ function createTestTable( } let testTableTdRows = []; - for (let i = 0; i < testTableData["col0"].length; i++) { + for (let i = 0; i < testTableData["col0"].td.length; i++) { let testTableTdRow; if (thAttributes.classTags.includes("data-sort")) { testTableTdRow = `${getRowsOfTd(i, "data-sort")}`; diff --git a/test/table.test.js b/test/table.test.js index ac2de01..5c3fae3 100644 --- a/test/table.test.js +++ b/test/table.test.js @@ -5,7 +5,7 @@ const createTestTable = require("./table"); test("Alpha - Capitalized ", () => { expect( createTestTable( - { col0: ["Echo", "Alpha", "Bravo", "Charlie", "Delta"] }, + { col0: {td: ["Echo", "Alpha", "Bravo", "Charlie", "Delta"]} }, { classTags: "", } @@ -16,7 +16,7 @@ test("Alpha - Capitalized ", () => { test("Alpha - Lowercase", () => { expect( createTestTable( - { col0: ["echo", "alpha", "bravo", "charlie", "delta"] }, + { col0: {td:["echo", "alpha", "bravo", "charlie", "delta"]} }, { classTags: "", } @@ -26,14 +26,14 @@ test("Alpha - Lowercase", () => { test("Numerical", () => { expect( - createTestTable({ col0: [5, 3, 4, 1, 2] }, { classTags: "" }) + createTestTable({ col0: {td: [5, 3, 4, 1, 2]} }, { classTags: "" }) ).toStrictEqual({ col0: ["1", "2", "3", "4", "5"] }); }); test("Alphanumeric: natural sort", () => { expect( createTestTable( - { col0: ["Alpha1", "Echo5", "Bravo2", "Charlie3", "Delta4"] }, + { col0: {td:["Alpha1", "Echo5", "Bravo2", "Charlie3", "Delta4"]} }, { classTags: "", } @@ -46,7 +46,7 @@ test("Alphanumeric: natural sort", () => { test("Dates", () => { expect( createTestTable( - { col0: ["1979/9/6", "2008/4/9", "1879/12/16", "1978/4/6", "1978/4/16"] }, + { col0: {td:["1979/9/6", "2008/4/9", "1879/12/16", "1978/4/6", "1978/4/16"]} }, { classTags: "" } ) ).toStrictEqual({ @@ -57,7 +57,7 @@ test("Dates", () => { test("Money", () => { expect( createTestTable( - { col0: ["$29", "$93", "$84", "$20", "$58"] }, + { col0: {td: ["$29", "$93", "$84", "$20", "$58"]} }, { classTags: "" } ) ).toStrictEqual({ col0: ["$20", "$29", "$58", "$84", "$93"] }); @@ -66,7 +66,7 @@ test("Money", () => { test("Empty cells sort at the end.", () => { expect( createTestTable( - { col0: ["Echo", "", "Bravo", "", "Alpha"] }, + { col0: {td: ["Echo", "", "Bravo", "", "Alpha"]} }, { classTags: "" } ) ).toStrictEqual({ col0: ["Alpha", "Bravo", "Echo", "", ""] }); @@ -75,19 +75,7 @@ test("Empty cells sort at the end.", () => { test("Order by file-size: file-size", () => { expect( createTestTable( - { - col0: [ - "10MB", - "10GB", - "10TB", - "10B", - "10MiB", - "10TiB", - "10Kib", - "10KB", - "10GiB", - ], - }, + { col0: {td:[ "10MB", "10GB", "10TB", "10B", "10MiB", "10TiB", "10Kib", "10KB", "10GiB", ]}}, { classTags: "file-size-sort" } ) ).toStrictEqual({ @@ -110,7 +98,7 @@ test("Order by file-size: file-size", () => { test("Alpha - lower & upper", () => { expect( createTestTable( - { col0: ["AlPhA", "bRaVo", "EcHo", "ChArLiE", "dElTa"] }, + { col0:{td: ["AlPhA", "bRaVo", "EcHo", "ChArLiE", "dElTa"] }}, { classTags: "", } @@ -120,14 +108,14 @@ test("Alpha - lower & upper", () => { test("Floating point numbers", () => { expect( - createTestTable({ col0: [6.23, 0.25, 3.15, 9.09, 0.35] }, { classTags: "" }) + createTestTable({ col0: {td: [6.23, 0.25, 3.15, 9.09, 0.35]} }, { classTags: "" }) ).toStrictEqual({ col0: ["0.25", "0.35", "3.15", "6.23", "9.09"] }); }); test("Release Versions", () => { expect( createTestTable( - { col0: ["4.18.0", "3.0.2", "4.1.0", "3.0.18", "4.2.0", "4.17.1"] }, + { col0: {td: ["4.18.0", "3.0.2", "4.1.0", "3.0.18", "4.2.0", "4.17.1"] }}, { classTags: "", } @@ -141,7 +129,7 @@ test("data-sort: example days of week", () => { expect( createTestTable( { - col0: [ + col0: {td:[ "Saturday", "Wednesday", "Sunday", @@ -149,7 +137,7 @@ test("data-sort: example days of week", () => { "Thursday", "Tuesday", "Monday", - ], + ],} }, { classTags: "data-sort" } ) @@ -170,7 +158,7 @@ test("data-sort clicked twice: example days of week", () => { expect( createTestTable( { - col0: [ + col0: {td: [ "Saturday", "Wednesday", "Sunday", @@ -179,7 +167,7 @@ test("data-sort clicked twice: example days of week", () => { "Tuesday", "Monday", ], - }, + }}, { classTags: "data-sort" }, { colsToClick: [0, 0], @@ -201,7 +189,7 @@ test("data-sort clicked twice: example days of week", () => { test("disable-sort: disable sorting on a column", () => { expect( createTestTable( - { col0: ["row2", "row1", "row4", "row3"] }, + { col0: {td: ["row2", "row1", "row4", "row3"]} }, { classTags: "disable-sort", } @@ -212,7 +200,7 @@ test("disable-sort: disable sorting on a column", () => { test("alpha-sort: sort alphabetically as opposed to natural sorting", () => { expect( createTestTable( - { col0: ["z2", "z11", "z89", "z82", "z8"] }, + { col0: {td: ["z2", "z11", "z89", "z82", "z8"]} }, { classTags: "alpha-sort", } @@ -223,7 +211,7 @@ test("alpha-sort: sort alphabetically as opposed to natural sorting", () => { test("punc-sort: sort involving punctuation - nat sort", () => { expect( createTestTable( - { col0: ["row2", "*row1", "-row4", "-row3", "#row3"] }, + { col0: {td: ["row2", "*row1", "-row4", "-row3", "#row3"]}}, { classTags: "punct-sort", }, @@ -238,8 +226,8 @@ test("testing that multiple columns works", () => { expect( createTestTable( { - col0: ["charlie", "alpha", "beta"], - col1: ["doris", "carrie", "fisher"], + col0: {td: ["charlie", "alpha", "beta"]}, + col1:{td: ["doris", "carrie", "fisher"]}, }, { classTags: "", @@ -257,7 +245,7 @@ test("testing that multiple columns works", () => { test("onload-sort: testing that it sorts without a click from user", () => { expect( createTestTable( - { col0: ["echo", "alpha", "bravo", "charlie", "delta"] }, + { col0: {td:["echo", "alpha", "bravo", "charlie", "delta"] }}, { classTags: "onload-sort", } @@ -269,8 +257,8 @@ test("Clicking multiple times (>2) doesn't break sorting", () => { expect( createTestTable( { - col0: ["charlie", "alpha", "beta"], - col1: ["doris", "carrie", "fisher"], + col0: {td: ["charlie", "alpha", "beta"]}, + col1: {td: ["doris", "carrie", "fisher"]}, }, { classTags: "", @@ -289,8 +277,8 @@ test("Sorting columns without rememeber-sort ", () => { expect( createTestTable( { - col0: ["charlie", "alpha", "beta"], - col1: ["doris", "carrie", "fisher"], + col0:{td: ["charlie", "alpha", "beta"]}, + col1: {td:["doris", "carrie", "fisher"]}, }, { classTags: "", @@ -310,8 +298,8 @@ test("Remember-sort: Sorting cols that have the rememeber-sort class.", () => { expect( createTestTable( { - col0: ["charlie", "alpha", "beta"], - col1: ["doris", "carrie", "fisher"], + col0: {td: ["charlie", "alpha", "beta"]}, + col1: {td:["doris", "carrie", "fisher"]}, }, { classTags: "", @@ -331,8 +319,8 @@ test("Checking ", () => { expect( createTestTable( { - col0: ["charlie", "alpha", "beta"], - col1: ["doris", "carrie", "fisher"], + col0: {td: ["charlie", "alpha", "beta"]}, + col1: {td: ["doris", "carrie", "fisher"]}, }, { classTags: "", @@ -352,7 +340,7 @@ test("runtime-sort", () => { expect( createTestTable( { - col0: [ + col0: {td:[ "2m 52s", "1h 20m 10s", "3s", @@ -365,7 +353,7 @@ test("runtime-sort", () => { "1m 36s", "41s", ], - }, + }}, { classTags: "runtime-sort", }, @@ -394,7 +382,7 @@ test("dates-dmy-sort: UK style dd/mm/yyyy; delim . or / or -", () => { expect( createTestTable( { - col0: [ + col0: {td: [ "17/6/1978", "18.10.2027", "10-12-2017", @@ -405,7 +393,7 @@ test("dates-dmy-sort: UK style dd/mm/yyyy; delim . or / or -", () => { "8/6/1978", "4/6/1978", ], - }, + }}, { classTags: "dates-dmy-sort" } ) ).toStrictEqual({ @@ -427,7 +415,7 @@ test("dates-mdy-sort: US style mm/dd/yyyy; delim . or / or -", () => { expect( createTestTable( { - col0: [ + col0: {td: [ "1-14-1992", "1.13.1992", "4.30.2008", @@ -435,7 +423,7 @@ test("dates-mdy-sort: US style mm/dd/yyyy; delim . or / or -", () => { "10-12-2017", "2/14/1992", ], - }, + }}, { classTags: "dates-mdy-sort" } ) ).toStrictEqual({ @@ -454,7 +442,7 @@ test("dates-mdy-sort US style overrides inferred class dates-dmy-sort:", () => { expect( createTestTable( { - col0: [ + col0: {td: [ "1-14-1992", "1.13.1992", "4.30.2008", @@ -462,7 +450,7 @@ test("dates-mdy-sort US style overrides inferred class dates-dmy-sort:", () => { "10-12-2017", "2/14/1992", ], - }, + }}, { classTags: "dates-mdy-sort dates-dmy-sort" } ) ).toStrictEqual({ @@ -481,7 +469,7 @@ test("dates-ymd-sort: ISO 8601 style yyyy/mm/dd; delim . or / or -", () => { expect( createTestTable( { - col0: ["2023/09/6", "2023-03-9", "2023.12.16", "2023/4/6", "2023/4/32"], + col0: {td: ["2023/09/6", "2023-03-9", "2023.12.16", "2023/4/6", "2023/4/32"]}, }, { classTags: "dates-ymd-sort" } ) @@ -494,7 +482,7 @@ test("Sort decimal numbers", () => { expect( createTestTable( { - col0: ["0.1", "0.2", "0.3", "0.11", "0.13", "0.13", "0.14"], + col0: {td: ["0.1", "0.2", "0.3", "0.11", "0.13", "0.13", "0.14"]}, }, { classTags: "numeric-sort" } ) @@ -507,7 +495,7 @@ test("Sort all combination positive, negative numbers with parenthesis as well", expect( createTestTable( { - col0: ["1.05", "-2.3", "-3", "1", "-6", "(1.4)", "14"], + col0: {td:["1.05", "-2.3", "-3", "1", "-6", "(1.4)", "14"]}, }, { classTags: "numeric-sort" } ) @@ -520,7 +508,7 @@ test("Sort all combination of negative and positive integers and decimal numbers expect( createTestTable( { - col0: [ + col0: {td:[ "1.05", "-2.3", "-3", @@ -532,7 +520,7 @@ test("Sort all combination of negative and positive integers and decimal numbers "b", "(c)", "{1}", - ], + ]}, }, { classTags: "numeric-sort" } ) @@ -557,7 +545,7 @@ test("default behavior without cells-sort (tr's move when sorted)", () => { expect( createTestTable( { - col0: ["8", "2", "3", "4", "5", "6", "0", "1", "7"], + col0: {td: ["8", "2", "3", "4", "5", "6", "0", "1", "7"]}, }, { classTags: "" }, // note this isn't an actual class just used for testing purposes @@ -582,7 +570,7 @@ test("cells-sort table class (tr's stay in place, but td's are sorted)", () => { expect( createTestTable( { - col0: ["8", "2", "3", "4", "5", "6", "0", "1", "7"], + col0: {td: ["8", "2", "3", "4", "5", "6", "0", "1", "7"]}, }, { classTags: "" }, { tableTags: "cells-sort", trClasses: "test" } @@ -601,3 +589,31 @@ test("cells-sort table class (tr's stay in place, but td's are sorted)", () => { ], }); }); + + +// +// test("colspan", () => { + // expect( + // createTestTable( + // { + // col0: {td:["8", "2", "3", "4", "5", "6", "0", "1", "7"]}, + // col1: {td:["8", "2", "3", "4", "5", "6", "0", "1", "7"]}, + // col2: {td:["8", "2", "3", "4", "5", "6", "0", "1", "7"]}, + // }, + // { classTags: "data-sort" }, + // { tableTags: "tr-sort", trClasses: "test" } + // ) + // ).toStrictEqual({ + // col0: [ + // ' 0', + // ' 1', + // ' 2', + // ' 3', + // ' 4', + // ' 5', + // ' 6', + // ' 7', + // ' 8', + // ], + // }); +// }); From dcc24d91340e4d5df58babab49df4d47164b7eda Mon Sep 17 00:00:00 2001 From: LeeWannacott Date: Tue, 30 May 2023 17:37:01 +1200 Subject: [PATCH 5/5] Fix formatting of table. --- test/table.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/table.js b/test/table.js index c6e4b3c..8f38140 100644 --- a/test/table.js +++ b/test/table.js @@ -63,12 +63,12 @@ function createTestTable( - ${testTableHeaders} + ${testTableHeaders} - - ${testTableTdRows} - -
+ + ${testTableTdRows} + + `);