Fix vCard folding and group parsing rules
Accept horizontal-tab continuations when unfolding content lines and allow hyphens in group names, matching the MIME-DIR and vCard grammar. Also add focused private tests covering both cases. AI-Assisted: yes AI-Tool: OpenAI Codex / gpt-5.4 xhigh
This commit is contained in:
@@ -163,8 +163,9 @@ proc readGroup*(p: var VCardParser): Option[string] =
|
||||
## name. If there is not a valid group the read position is left unchanged.
|
||||
|
||||
p.setBookmark
|
||||
let validChars = ALPHA_NUM + {'-'}
|
||||
var ch = p.read
|
||||
while ALPHA_NUM.contains(ch): ch = p.read
|
||||
while validChars.contains(ch): ch = p.read
|
||||
|
||||
if (ch == '.'):
|
||||
result = some(readSinceBookmark(p)[0..^2])
|
||||
|
||||
Reference in New Issue
Block a user