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=25adb8e7568b748a08f3106fcd30ac81e8cf0d6f;hpb=ee17707ee2e9a69e40eb0897d830d7b582214619 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 = {}, {}, {}