JetBrains / markdown

Markdown parser written in kotlin
Apache License 2.0
706 stars 78 forks source link

Impossible to expand #158

Open gamess431 opened 6 months ago

gamess431 commented 6 months ago

The processNode function from the GeneratingProvider interface requires a specific implementation of the HtmlGenerator.HtmlGeneratingVisitor class rather than an abstraction while HtmlGenerator.HtmlGeneratingVisitor implements the RecursiveVisitor interface.

interface GeneratingProvider {
    fun processNode(visitor: HtmlGenerator.HtmlGeneratingVisitor, text: String, node: ASTNode)
}

Please replace HtmlGenerator.HtmlGeneratingVisitor with RecursiveVisitorin the parameters of the GeneratingProvider interface so you can expand or create your own generator! Also, make the class HtmlGenerator open so that it can be extended.

gamess431 commented 6 months ago

i wanted to write a converter from markdown to json, but duo to this imitation i was unable.