Task: Implement the Contact Renderer feature
TASK-DESCRIPTION
- Create:
sources/render/contact_render.h - Create:
sources/render/contact_render.cpp - Create:
tests/contact_render_test.cpp - Create:
tests/40-contact-render.sh - Modify:
sources/CMakeLists.txt
The renderer implements the requirements in prompts/features/04-contact-renderer.md. It draws one self-contained SVG card: the name, organisation, title, the reach sections, the postal addresses, the note, and an embedded photo. Every string from the card is escaped, and only mailto:, tel:, http:, and https: are made clickable, so a card cannot put a javascript: link into the file.
TASK-OUTPUT
Produce these complete files in this order, then the VERIFICATION: line: 1. sources/render/contact_render.h 2. sources/render/contact_render.cpp 3. tests/contact_render_test.cpp 4. tests/40-contact-render.sh 5. sources/CMakeLists.txt
TASK-CONTEXT
sources/vcard/vcard_model.h and does not reopen the file, so the card it draws is the card the reader returned. documents/10-vcard-format.md records the value forms it must expect.
href from a scheme other than mailto:, tel:, http:, or https:.
TASK-FILES
| Operation | Path |
|---|---|
| create | sources/render/contact_render.h |
| create | sources/render/contact_render.cpp |
| create | tests/contact_render_test.cpp |
| create | tests/40-contact-render.sh |
| modify | sources/CMakeLists.txt |
TASK-VERIFY
- Run:
make testfrom the repository root. - Expected: exit status 0, with
40-contact-renderreportingok.
TASK-FEATURES
prompts/features/04-contact-renderer.md
TASK-ACCEPTANCE
CONTACT-RENDERER-R001CONTACT-RENDERER-R002CONTACT-RENDERER-R003CONTACT-RENDERER-R004CONTACT-RENDERER-R005CONTACT-RENDERER-R006CONTACT-RENDERER-R008CONTACT-RENDERER-R013
OUTPUT: the complete files in the order listed, ending with the VERIFICATION: line.