From 64bf1091258477f505bf07939007440f86d33254 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 2 May 2022 20:29:56 +0200 Subject: MarkdownConverter: Enable FootnoteExtension. Change-Id: I6c7018edfd4e41e54390c397a3ba675d30ccabc6 --- .../java/eu/mulk/mulkcms2/common/markdown/MarkdownConverter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/mulk/mulkcms2/common/markdown/MarkdownConverter.java b/src/main/java/eu/mulk/mulkcms2/common/markdown/MarkdownConverter.java index 0200514..75f6c8d 100644 --- a/src/main/java/eu/mulk/mulkcms2/common/markdown/MarkdownConverter.java +++ b/src/main/java/eu/mulk/mulkcms2/common/markdown/MarkdownConverter.java @@ -3,6 +3,7 @@ package eu.mulk.mulkcms2.common.markdown; import com.vladsch.flexmark.ext.abbreviation.AbbreviationExtension; import com.vladsch.flexmark.ext.autolink.AutolinkExtension; import com.vladsch.flexmark.ext.definition.DefinitionExtension; +import com.vladsch.flexmark.ext.footnotes.FootnoteExtension; import com.vladsch.flexmark.ext.gfm.strikethrough.StrikethroughExtension; import com.vladsch.flexmark.ext.tables.TablesExtension; import com.vladsch.flexmark.ext.typographic.TypographicExtension; @@ -30,12 +31,14 @@ public class MarkdownConverter { AbbreviationExtension.create(), AutolinkExtension.create(), DefinitionExtension.create(), - TypographicExtension.create())); + TypographicExtension.create(), + FootnoteExtension.create())); options.set(Parser.FENCED_CODE_BLOCK_PARSER, true); options.set(HtmlRenderer.SOFT_BREAK, "\n"); options.set(HtmlRenderer.HARD_BREAK, "
\n"); options.set(TypographicExtension.ENABLE_SMARTS, true); options.set(TypographicExtension.ENABLE_QUOTES, true); + options.set(FootnoteExtension.FOOTNOTE_BACK_REF_STRING, ""); this.parser = Parser.builder(options).build(); this.renderer = HtmlRenderer.builder(options).build(); -- cgit v1.2.3