Skip to content

Conversation

@maciej-sz
Copy link

@maciej-sz maciej-sz commented May 31, 2025

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 RenderBytesTo function that accepts a writer
  • Added a RenderBytesTo method to the TermRenderer type
  • Refactored RenderBytes to use the new RenderBytesTo method
  • Added comprehensive tests for the new functionality

Related issue/discussion: N/A

Checklist before requesting a review

  • I have read CONTRIBUTING.md
  • 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:

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.

1 participant