jgm / djot

A light markup language
https://djot.net
MIT License
1.67k stars 43 forks source link

error when parsing empty table cells #55

Closed FrankFischer closed 1 year ago

FrankFischer commented 1 year ago

"| a |" (without the quotes) produces a one cell table. If you delete just the letter "a" then https://djot.net/playground/ hangs and has to be reloaded (caused by "ast.lua:520: unmatched -row encountered at byte xxxx").

A workaround is "| \ |" (which puts a non breaking space into the cell). But this looks a little bit clumsy.

jgm commented 1 year ago

Thanks. Looks like cell is open but not closed:

% lua bin/main.lua -m
| |
+table 1-1
+row 1-1
+cell 1-1
-row 3-3
-table 5-5