All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.commonmark.ext.autolink.AutolinkExtension Maven / Gradle / Ivy

package org.commonmark.ext.autolink;

import org.commonmark.Extension;
import org.commonmark.ext.autolink.internal.AutolinkPostProcessor;
import org.commonmark.parser.Parser;

/**
 * Extension for automatically turning plain URLs and email addresses into links.
 * 

* Create it with {@link #create()} and then configure it on the builders * ({@link org.commonmark.parser.Parser.Builder#extensions(Iterable)}, * {@link org.commonmark.html.HtmlRenderer.Builder#extensions(Iterable)}). *

*

* The parsed links are turned into normal {@link org.commonmark.node.Link} nodes. *

*/ public class AutolinkExtension implements Parser.ParserExtension { private AutolinkExtension() { } public static Extension create() { return new AutolinkExtension(); } @Override public void extend(Parser.Builder parserBuilder) { parserBuilder.postProcessor(new AutolinkPostProcessor()); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy