(line)
| 41 | } |
| 42 | |
| 43 | function isSessionBoundary(line) { |
| 44 | return ( |
| 45 | /^In\[\d+\]:=/.test(line) || |
| 46 | /^[A-Za-z$][A-Za-z0-9$]*::[A-Za-z0-9]+:/.test(line) || |
| 47 | /^time: command terminated abnormally\./.test(line) || |
| 48 | /^(?:real|user|sys)\s+\d/.test(line) || |
| 49 | /^-{20,}\s*$/.test(line) || |
| 50 | /^\w{3} \w{3}\s+\d{1,2} \d{2}:\d{2}:\d{2} \w+ \d{4}$/.test(line) || |
| 51 | /^euler% math$/.test(line) || |
| 52 | /^Mathematica \d/.test(line) |
| 53 | ); |
| 54 | } |
| 55 | |
| 56 | function repairTerminalWrapping(lines) { |
| 57 | const repaired = []; |