com.vladsch.flexmark.html.renderer.LinkResolverContext Java Examples

The following examples show how to use com.vladsch.flexmark.html.renderer.LinkResolverContext. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LinkRendererExtension.java    From jphp with Apache License 2.0 6 votes vote down vote up
@Override
public void extend(HtmlRenderer.Builder rendererBuilder, String rendererType) {
    rendererBuilder.linkResolverFactory(new LinkResolverFactory() {
        @Override
        public Set<Class<? extends LinkResolverFactory>> getAfterDependents() {
            return null;
        }

        @Override
        public Set<Class<? extends LinkResolverFactory>> getBeforeDependents() {
            return null;
        }

        @Override
        public boolean affectsGlobalScope() {
            return false;
        }

        @Override
        public LinkResolver create(LinkResolverContext context) {
            return linkResolver;
        }
    });
}
 
Example #2
Source File: FlexmarkPreviewRenderer.java    From markdown-writer-fx with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
public AttributeProvider create(LinkResolverContext context) {
	return new MyAttributeProvider();
}
 
Example #3
Source File: FlexmarkAttributeProvider.java    From markdown-page-generator-plugin with MIT License 4 votes vote down vote up
public FlexmarkAttributeProvider(LinkResolverContext context) {
    DataHolder options = context.getOptions();
    attributeMap = options.get(AttributesExtension.ATTRIBUTE_MAP);
}
 
Example #4
Source File: FlexmarkAttributeProvider.java    From markdown-page-generator-plugin with MIT License 4 votes vote down vote up
@Override
public AttributeProvider apply(LinkResolverContext context) {
    return new FlexmarkAttributeProvider(context);
}