projects
/
matthijs
/
master-project
/
report.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee17707
)
Make pret-trans complain on invalid input.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Thu, 27 Aug 2009 11:03:39 +0000
(13:03 +0200)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Thu, 27 Aug 2009 11:08:28 +0000
(13:08 +0200)
Before, the lua would just crash with a vague error.
pret-trans.lua
patch
|
blob
|
history
diff --git
a/pret-trans.lua
b/pret-trans.lua
index ac1b525946364600d9bff3616f14ec6539921cd8..238a4e5c1d9e798dd9dddbfa3d6dea552b9aa361 100644
(file)
--- 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 = {}, {}, {}