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:
@@ -1272,6 +1272,13 @@ proc runVCard3PrivateTests*() =
|
||||
assert g.isSome
|
||||
assert g.get == "mygroup"
|
||||
|
||||
# "readGroup with hyphen":
|
||||
block:
|
||||
var p = initParser("item-1.BEGIN:VCARD")
|
||||
let g = p.readGroup
|
||||
assert g.isSome
|
||||
assert g.get == "item-1"
|
||||
|
||||
# "readGroup without group":
|
||||
block:
|
||||
var p = initParser("BEGIN:VCARD")
|
||||
|
||||
Reference in New Issue
Block a user