samengine 1.7.5 → 1.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  // Function to get the Version
2
2
  export function version() {
3
- return "1.7.5";
3
+ return "1.7.6";
4
4
  }
@@ -193,10 +193,10 @@ function parseTable(block, opts) {
193
193
  if (rows.length < 2)
194
194
  return `<p>${renderInline(block, opts)}</p>`;
195
195
  const headerCells = rows[0]
196
- .split("|")
196
+ .split(/(?<!\\)\|/)
197
197
  .filter((_, i, a) => !(i === 0 && _ === "") && !(i === a.length - 1 && _ === ""))
198
198
  .map((c) => c.trim());
199
- const alignRow = rows[1].split("|").filter((c) => /[-:]/.test(c));
199
+ const alignRow = rows[1].split(/(?<!\\)\|/).filter((c) => /[-:]/.test(c));
200
200
  const aligns = alignRow.map((c) => {
201
201
  c = c.trim();
202
202
  if (c.startsWith(":") && c.endsWith(":"))
@@ -215,7 +215,7 @@ function parseTable(block, opts) {
215
215
  .join("\n")}\n</tr>\n</thead>`;
216
216
  const bodyRows = rows.slice(2).map((row) => {
217
217
  const cells = row
218
- .split("|")
218
+ .split(/(?<!\\)\|/)
219
219
  .filter((_, i, a) => !(i === 0 && _ === "") && !(i === a.length - 1 && _ === ""))
220
220
  .map((c) => c.trim());
221
221
  return `<tr>\n${cells
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "samengine",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
4
4
  "description": "A TypeScript game library to make HTML Games",
5
5
  "sideEffects": false,
6
6
  "files": [