From 8e261c2839adaafad9fb5d50b21f0fbf6dc8b63c Mon Sep 17 00:00:00 2001 From: skanaar Date: Mon, 31 Aug 2020 08:38:01 +0200 Subject: [PATCH] more robust table syntax --- dist/nomnoml.js | 2 +- src/visuals.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/nomnoml.js b/dist/nomnoml.js index a2d931f..586c234 100644 --- a/dist/nomnoml.js +++ b/dist/nomnoml.js @@ -1280,7 +1280,7 @@ var nomnoml; } for (var _i = 0, gridcells_1 = gridcells; _i < gridcells_1.length; _i++) { var comp = gridcells_1[_i]; - if (!isEnd(comp) && isRowBreak(comp)) { + if (!isEnd(comp) && isRowBreak(comp) && nomnoml.skanaar.last(rows).length) { rows.push([]); } else if (isRowFull(comp)) { diff --git a/src/visuals.ts b/src/visuals.ts index 76336d4..4982c3b 100644 --- a/src/visuals.ts +++ b/src/visuals.ts @@ -161,7 +161,7 @@ namespace nomnoml { return comp == skanaar.last(gridcells) } for (var comp of gridcells) { - if (!isEnd(comp) && isRowBreak(comp)) { + if (!isEnd(comp) && isRowBreak(comp) && skanaar.last(rows).length) { rows.push([]) } else if (isRowFull(comp)) { rows.push([comp])