Tasks tab: NE Hub lists plus iCloud reminder lists where Apple exposes them
build-container / build (push) Successful in 1m43s
build-container / build (push) Successful in 1m43s
- Lists, quick add, due dates, notes, complete/reopen, delete; Home card for overdue/due today - iCloud VTODO lists read and written over CalDAV (If-Match, edits patch the latest copy so priority/alarms survive); NE Hub lists work regardless - Fix: text inside a nested VALARM was read as the task's / event's own description and then written back on edit; nested components are now skipped (regression tests added) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5c7917e57c
commit
916882e55d
9 files changed
+307
-15
No files matched your search
@@ -95,11 +95,14 @@ function parseDuration(v) {
|
||||
}
|
||||
|
||||
function parseEvents(text) {
|
||||
const events = []; let cur = null;
|
||||
const events = []; let cur = null, depth = 0;
|
||||
for (const line of unfold(text)) {
|
||||
if (line === 'BEGIN:VEVENT') { cur = { ex: [] }; continue; }
|
||||
if (line === 'BEGIN:VEVENT') { cur = { ex: [] }; depth = 0; continue; }
|
||||
if (line === 'END:VEVENT') { if (cur && cur.start) events.push(cur); cur = null; continue; }
|
||||
if (!cur) continue;
|
||||
if (/^BEGIN:/.test(line)) { depth++; continue; } // skip nested VALARM so its DESCRIPTION/SUMMARY never replaces the event's
|
||||
if (/^END:/.test(line)) { depth--; continue; }
|
||||
if (depth > 0) continue;
|
||||
const l = parseLine(line); if (!l) continue;
|
||||
switch (l.name) {
|
||||
case 'DTSTART': cur.start = parseDate(l.value, l.params); break;
|
||||
@@ -336,4 +339,4 @@ async function handle(req, res) {
|
||||
} catch (e) { json(res, 400, { error: e.message }); }
|
||||
}
|
||||
|
||||
module.exports = { handle, feed, parseEvents, expand, zonedToUtc, assertPublic, localIcs };
|
||||
module.exports = { unfold, parseLine, parseDate, unesc, handle, feed, parseEvents, expand, zonedToUtc, assertPublic, localIcs };
|
||||
Reference in new issue
Block a user