local utf = unicode.utf8
-vis = buffers.newvisualizer("trans")
+local vis = buffers.newvisualizer("trans")
local commands = {}
-- A command to create a horizontal rule.
-- Capture all lines, without generating any output
function vis.begin_of_display()
lines = {}
+ -- Let all the lambda pretty printing in this buffer use shared subscript
+ -- detection
+ buffers.visualizers.handlers.lam.begin_of_block()
end
function vis.begin_of_line(n)
-- Don't generate output here
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 = {}, {}, {}
-- Clean up
lines = {}
+ buffers.visualizers.handlers.lam.end_of_block()
end
-- vim: set sw=4 sts=4 expandtab ai: