mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 02:05:22 -04:00
Ignore non-string markdown table rows (#1648)
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
// cells too, so "| a | | c |" collapsed to 2 columns and misaligned with the
|
||||
// header.
|
||||
export function splitTableRow(row) {
|
||||
return (row || '')
|
||||
const text = typeof row === 'string' ? row : '';
|
||||
return text
|
||||
.replace(/^\s*\|/, '')
|
||||
.replace(/\|\s*$/, '')
|
||||
.split('|')
|
||||
|
||||
Reference in New Issue
Block a user