mirror of https://github.com/apache/lucene.git
Update flexmark to latest version
This commit is contained in:
parent
f1911f82d5
commit
52090c9b11
|
@ -2387,7 +2387,7 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
|
|||
</target>
|
||||
|
||||
<target name="resolve-markdown" unless="markdown.loaded" depends="resolve-groovy">
|
||||
<property name="flexmark.version" value="0.16.1"/>
|
||||
<property name="flexmark.version" value="0.42.6"/>
|
||||
<ivy:cachepath transitive="true" resolveId="flexmark" pathid="markdown.classpath">
|
||||
<ivy:dependency org="com.vladsch.flexmark" name="flexmark" rev="${flexmark.version}" conf="default" />
|
||||
<ivy:dependency org="com.vladsch.flexmark" name="flexmark-ext-autolink" rev="${flexmark.version}" conf="default" />
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
import org.apache.tools.ant.AntTypeDefinition;
|
||||
import org.apache.tools.ant.ComponentHelper;
|
||||
import org.apache.tools.ant.filters.TokenFilter.ChainableReaderFilter;
|
||||
import com.vladsch.flexmark.ast.Node;
|
||||
import com.vladsch.flexmark.util.ast.Document;
|
||||
import com.vladsch.flexmark.ast.Heading;
|
||||
import com.vladsch.flexmark.html.HtmlRenderer;
|
||||
import com.vladsch.flexmark.parser.Parser;
|
||||
|
@ -40,7 +40,7 @@ public final class MarkdownFilter extends ChainableReaderFilter {
|
|||
options.set(Parser.EXTENSIONS, [ AbbreviationExtension.create(), AutolinkExtension.create() ]);
|
||||
options.set(HtmlRenderer.RENDER_HEADER_ID, true);
|
||||
options.set(HtmlRenderer.MAX_TRAILING_BLANK_LINES, 0);
|
||||
Node parsed = Parser.builder(options).build().parse(markdownSource);
|
||||
Document parsed = Parser.builder(options).build().parse(markdownSource);
|
||||
|
||||
StringBuilder html = new StringBuilder('<html>\n<head>\n');
|
||||
CharSequence title = parsed.getFirstChildAny(Heading.class)?.getText();
|
||||
|
|
Loading…
Reference in New Issue