Skip to content

Render result structure#12

Merged
davefowler merged 1 commit intomainfrom
cursor/render-result-structure-4c33
Jan 28, 2026
Merged

Render result structure#12
davefowler merged 1 commit intomainfrom
cursor/render-result-structure-4c33

Conversation

@davefowler
Copy link
Collaborator

Add RenderResult dataclass and render_content() function to provide structured SVG output for easier composition and dimension access.


Open in Cursor Open in Web

- Add RenderResult dataclass with content, width, height fields
- Add to_svg() method for convenience when you need the full SVG
- Add render_content() method to SVGRenderer class
- Add render_content() convenience function at module level
- Export RenderResult and render_content from __init__.py
- Add comprehensive tests for the new API
- Update README with documentation and examples

This allows callers to compose multiple mdsvg outputs into larger SVGs
without needing regex extraction to strip wrappers.

Co-authored-by: davefowler <davefowler@gmail.com>
@cursor
Copy link

cursor bot commented Jan 28, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@davefowler davefowler marked this pull request as ready for review January 28, 2026 23:54
@davefowler davefowler merged commit 0d94b54 into main Jan 28, 2026
5 checks passed
@davefowler davefowler deleted the cursor/render-result-structure-4c33 branch January 28, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants