MN7IONOTMGWYZUFBYK3VJLYT4ZQ37ZFEAFO7IJ3AB6NXPKDY7PMAC
local snippet = contents:sub(math.max(1, index-100), math.min(#contents, index+100))
local start_offset = find_previous_byte(contents, '\n', index)
local end_offset = contents:find('\n', index, --[[literal]] true)
local snippet = contents:sub(start_offset, end_offset)