glamour
glamour copied to clipboard
feat: Adds RenderBytesTo for rendering markdown to a externally provided writer
Added a new RenderBytesTo function that allows rendering markdown directly to an externally provided writer. This gives users more control over the output destination, enabling various use cases such as:
- Writing directly to files without intermediate buffers
- Streaming output to network connections
- Using custom writers with additional processing logic
- Integration with existing I/O pipelines
Key changes:
- Added a new package-level
RenderBytesTofunction that accepts a writer - Added a
RenderBytesTomethod to theTermRenderertype - Refactored
RenderBytesto use the newRenderBytesTomethod - Added comprehensive tests for the new functionality
Related issue/discussion: N/A
Checklist before requesting a review
- [x] I have read
CONTRIBUTING.md - [x] I have performed a self-review of my code
If this is a feature
- [ ] I have created a discussion
- [ ] A project maintainer has approved this feature request. Link to comment: