editor_to_string = function(editor) return table.concat(map(editor.lines, function(line) return line.data end), '\n') end