Still lots broken:
ZSXRELZMBQAH2SURKXJW7XR42WGT6L6DQBBMBMHAHJCVKAANK5HQC
DCEZF23IB4LTMH6MPAWVUO47YZX5RUHOV2HMNOMNTFM3H3YM63MAC
R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC
OF4P6TYQA7SUF4N2KPDN7LRTIRNXME2IZJHRLFGF3EMDTWZSGOYAC
ZXQ2MMPAOIA4TN3TWMFPXZUL7NUE3EWXLV2JHBQXEINE7WCKFSIQC
WR2DV3AKK2KMZNXDYTK2P5QJGRUM2WQG6UUCUAAJX4B5HBIBFYWAC
MBESMU4YJIMFOX2OM2CUG3Y6TO64G4F5YU4ZIPJMED3TVTSNA6CAC
FHHATD2K3LNFNJ4YKTCHAWKBNB5VSASQR4T6TQ5PK4O433P4FOEQC
TBPJ5WSRM5IKQH7FTAVYTWWUBWW7G2CLT5M6FN7CMPLD6Y77YIWQC
FBDRJ53NJ5BWDQGU2GWZ6NEYHKCCRD7RODMIG7QQZBRFUB4HR7OAC
R5HNWYMH47LWVHS5VVXNR6TCBDXDURVXZ6RCUNFTTTMIXF275ULQC
6C3UZDESM2HPFIHAW5YIPUV6VXO4YV5DIEY574HUGP2DGOQNUVOAC
ZANGJNNX6EITFBOF6NWCF2EM5BDQDEIOD4UPWMF5I6SKAURRTIHAC
reply_button = function(filename, index, depth)
return {
type='text', data={{data='reply'}},
button=true, margin=20,
name=filename, item_index=index,
depth=depth,
bg=Reply_button_color,
border=Reply_button_border_color,
}
end
indent = function(depth)
return {type='rectangle', w=depth*Indent, h=0}
end
next_comment = function(id)
local num_replies = #load_metadata(id).replies
local corename = id:gsub('%.md$', '')
return ('%s-%d.md'):format(corename, num_replies)
end
new_comment = function(parent_id, depth)
local comment = {
type='text',
filename=full_path(next_comment(parent_id)),
data={{data=''}},
width=Width,
depth=depth+1,
metadata={replies={}},
border=Border_color,
}
local result = cols(20)
table.insert(result.data, indent(depth+1))
local item_stuff = rows()
table.insert(result.data, item_stuff)
table.insert(item_stuff.data, comment)
table.insert(item_stuff.data, reply_button(comment.filename, 0, depth+1))
return result
end
table.insert(item_stuff.data, {
type='text', data={{data='reply'}},
button=true, name=filename,
margin=20,
bg=Reply_button_color,
border=Reply_button_border_color,
})
table.insert(item_stuff.data,
reply_button(filename, #out, depth))