git/dew/main

history view strips completion metadata with string replacement

open #0009 issues/0009-history-view-strips-completion-metadata-with-strin.md opened
bug

Rendering done.txt strips the x <date> prefix from the parsed description with:

strings.Replace(desc, "x "+parts[1], "", 1)

It assumes parts[1] is a 10-character date. That happens to work for lines dew writes itself, but any task whose description contains the literal x <date> gets silently mangled, and the completed date is re-derived from raw fields on every frame (once in the measuring loop and again in the render loop).

Fix: parse the x <date> prefix once in ParseTask (e.g. an IsDone + DoneDate field) and render from that.