         [ 0, text[3] ]
       else
         [ 1, text[1] + text[3] ]
-    lines = data.trim().split('\n')
+    lines = data.trim().split(/\r?\n/)
 
     justify = for cell in splitCells stripTailPipes formatline
       [first, ..., last] = cell.trim()

    )
    ( # body capture
      (?:
        (?:[^\n]*?\|[^\n]*)       # line w/ at least one pipe
        \ *                       # maybe trailing whitespace
        (?:\r?\n|$)               # newline
      )+ # at least one

  regex: ///
    ( # header capture
      (?:
        (?:[^\r\n]*?\|[^\r\n]*)       # line w/ at least one pipe
        \ *                       # maybe trailing whitespace
      )?                          # maybe header
      (?:\r?\n|^)                 # newline
