Skip to content

Commit

Permalink
simplify createRowStart logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandabler committed May 1, 2018
1 parent 5c061b5 commit 7222fe3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ class TableEngine {
}

createRowStart(rowStart) {
let row = "<tr";

// rowStart could be null if we are working with the first
// row group because the "|-" delimiter is optional
const match = rowStart ? rowStart.match(/\|-\s*(.+)/) : null;

row += match !== null ? ` ${match[1]}>` : ">";
const row = match !== null ? `<tr ${match[1]}>` : "<tr>";
return row + "\n";
}

Expand Down

0 comments on commit 7222fe3

Please sign in to comment.