com.vladsch.flexmark.formatter.NodeFormattingHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flexmark-formatter Show documentation
Show all versions of flexmark-formatter Show documentation
flexmark-java extension for formatter
package com.vladsch.flexmark.formatter;
import com.vladsch.flexmark.util.ast.Node;
import com.vladsch.flexmark.util.ast.NodeAdaptingVisitHandler;
public class NodeFormattingHandler extends NodeAdaptingVisitHandler> implements CustomNodeFormatter {
public NodeFormattingHandler(Class extends N> aClass, CustomNodeFormatter adapter) {
super(aClass, adapter);
}
@Override
public void render(Node node, NodeFormatterContext context, MarkdownWriter markdown) {
//noinspection unchecked
myAdapter.render((N) node, context, markdown);
}
}