Skip to content

generic Renderer for render targets richer than String #364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rpm0372
Copy link

@rpm0372 rpm0372 commented Feb 13, 2025

Changed org.commonmark.node.Node.Renderer to Renderer<T> and updated all three type descendants to concretize as Render<String>.

This change was motivated by my project's need to render markdown to targets not easily represented as a single String.

@robinst
Copy link
Collaborator

robinst commented Mar 23, 2025

This change was motivated by my project's need to render markdown to targets not easily represented as a single String.

Can you explain this more? So you want to be able to have a Renderer<Something>? Why can't you define your own interface (and delegate to commonmark's Renderer)?

@rpm0372
Copy link
Author

rpm0372 commented Mar 23, 2025

Because commonmark's Renderer interface only supports returning a String.

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