I can't seem to break it, though I'm sleepy and don't have a good grasp of the big picture.
OZE5GYQFNEYCK3VZLHRCPNIFCSJFKZOAPGP4N3FSGZ347BFJZCZAC
ZSXRELZMBQAH2SURKXJW7XR42WGT6L6DQBBMBMHAHJCVKAANK5HQC
R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC
ZXQ2MMPAOIA4TN3TWMFPXZUL7NUE3EWXLV2JHBQXEINE7WCKFSIQC
FHHATD2K3LNFNJ4YKTCHAWKBNB5VSASQR4T6TQ5PK4O433P4FOEQC
OF4P6TYQA7SUF4N2KPDN7LRTIRNXME2IZJHRLFGF3EMDTWZSGOYAC
7YS7SSXMLS3W456N7U36HY2PTE4PX3MZNUXRJ3IYDUQU6J3IG2SAC
IK44FMQWGJQ2SGSVHYNDUHWSEE5GA25FI5DRVH2ETQJ3SJWHJNRQC
DCEZF23IB4LTMH6MPAWVUO47YZX5RUHOV2HMNOMNTFM3H3YM63MAC
FBDRJ53NJ5BWDQGU2GWZ6NEYHKCCRD7RODMIG7QQZBRFUB4HR7OAC
R5HNWYMH47LWVHS5VVXNR6TCBDXDURVXZ6RCUNFTTTMIXF275ULQC
find_comment_index = function(id)
assert(Global_state.thread.type == 'rows')
for i,row in ipairs(Global_state.thread.data) do
assert(row.type == 'cols')
assert(#row.data == 2)
assert(row.data[2].type == 'rows')
if row.data[2].data[1].id == id then
return i
end
end
end
save_metadata = function(node)
--print('saving metadata for', node.id)
local mfile = metadata_file(node.id)
local mpath = save_dir_path(mfile)
love.filesystem.write(mpath, json.encode(node.metadata))
end
find_node = function(node, id)
if node.type == 'text' and not node.button then
if node.id == id then
return node
else
return nil
end
end
if node.type == 'rows' or node.type == 'cols' then
for _,child in ipairs(node.data) do
local t = find_node(child, id)
if t then return t end
end
end
end
initialize_item = function(filename, depth)
local result = {filename=full_path(filename)}
initialize_item = function(id, depth)
local result = {
type='text',
id=id, filename=full_path(id),
width=Width, depth=depth,
metadata=load_metadata(id),
border=Border_color,
}