Search in sources :

Example 1 with MarkdownForJSPWikiExtension

use of org.apache.wiki.markdown.MarkdownForJSPWikiExtension in project jspwiki by apache.

the class MarkdownDocument method options.

/**
 * configuration options for MarkdownRenderers.
 *
 * @param context current wikicontext
 * @return configuration options for MarkdownRenderers.
 */
public static MutableDataSet options(final WikiContext context) {
    MutableDataSet options = new MutableDataSet();
    options.setFrom(ParserEmulationProfile.COMMONMARK);
    // align style of Markdown's footnotes extension with jspwiki footnotes refs
    options.set(FootnoteExtension.FOOTNOTE_LINK_REF_CLASS, JSPWikiMarkupParser.CLASS_FOOTNOTE_REF);
    options.set(Parser.EXTENSIONS, Arrays.asList(new Extension[] { new MarkdownForJSPWikiExtension(context), FootnoteExtension.create(), TocExtension.create() }));
    return options;
}
Also used : TocExtension(com.vladsch.flexmark.ext.toc.TocExtension) FootnoteExtension(com.vladsch.flexmark.ext.footnotes.FootnoteExtension) MarkdownForJSPWikiExtension(org.apache.wiki.markdown.MarkdownForJSPWikiExtension) Extension(com.vladsch.flexmark.Extension) MarkdownForJSPWikiExtension(org.apache.wiki.markdown.MarkdownForJSPWikiExtension) MutableDataSet(com.vladsch.flexmark.util.options.MutableDataSet)

Aggregations

Extension (com.vladsch.flexmark.Extension)1 FootnoteExtension (com.vladsch.flexmark.ext.footnotes.FootnoteExtension)1 TocExtension (com.vladsch.flexmark.ext.toc.TocExtension)1 MutableDataSet (com.vladsch.flexmark.util.options.MutableDataSet)1 MarkdownForJSPWikiExtension (org.apache.wiki.markdown.MarkdownForJSPWikiExtension)1