X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Freport.git;a=blobdiff_plain;f=pret-trans.lua;h=238a4e5c1d9e798dd9dddbfa3d6dea552b9aa361;hp=ac1b525946364600d9bff3616f14ec6539921cd8;hb=1864c65fe74e332c5aca3ccb9878b98aa1aa93e7;hpb=cb736fa056825e66c2831a01843cfcaf4bf9b4b8 diff --git a/pret-trans.lua b/pret-trans.lua index ac1b525..238a4e5 100644 --- a/pret-trans.lua +++ b/pret-trans.lua @@ -91,7 +91,11 @@ function vis.end_of_display() break end end - + + if not len then + error("No horizontal separator found in:\n" .. table.concat(lines, "\n")) + end + -- Split the input in three parts. Stuff before the line, stuff -- after the line, stuff to the right of the line. before, after, rights = {}, {}, {}