Skip to content
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

renderer: add support for extending node renderers #16

Merged
merged 4 commits into from
Feb 8, 2024

Conversation

benclmnt
Copy link
Contributor

Hi, I added support for extending node renderer similar to goldmark's HTML renderer.

An example usage:

markdownRenderer := markdown.NewRenderer()
markdownRenderer.AddOptions(
	renderer.WithNodeRenderers(util.Prioritized(&latex.BlockRenderer{
		RendererType: latex.RendererTypeMarkdown,
	}, 502)),
)
md := goldmark.New(
	goldmark.WithRenderer(markdownRenderer),
)	

@coveralls
Copy link

coveralls commented Apr 6, 2023

Pull Request Test Coverage Report for Build 7825492430

  • 0 of 102 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 7551523042: 0.0%
Covered Lines: 452
Relevant Lines: 452

💛 - Coveralls

renderer.go Show resolved Hide resolved
Copy link
Owner

@teekennedy teekennedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than my one requested change this looks good!

renderer.go Show resolved Hide resolved
@teekennedy teekennedy merged commit 0cdef01 into teekennedy:main Feb 8, 2024
2 checks passed
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.

None yet

3 participants