-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
Description
Hi,
I use flexmark and i have a problem with definition extension.
This is my markdown text :
Definition 1
: My name is john
:
: **John riley**
Definition 2
: And you ?
:
: Me ? really ?
After processing, i have this html render
<dl>
<dt>Definition 1</dt>
<dd>My name is john</dd>
<dd>
<dd><strong>John riley</strong></dd>
</dd>
<dt>Definition 2</dt>
<dd>And you ?</dd>
<dd>
<dd>Me ? really ?</dd>
</dd>
</dl>I would like something like that
<dl>
<dt>Definition 1</dt>
<dd>My name is john</dd>
<dd><strong>John riley</strong></dd>
</dl>
<dl>
<dt>Definition 2</dt>
<dd>And you ?</dd>
<dd>Me ? really ?</dd>
</dl>Means, two blocks of <dl> instead one, and no double <dd> for second line of definition content.
This is my java code :
static final MutableDataHolder OPTIONS = new MutableDataSet()
//.set(Parser.REFERENCES_KEEP, KeepType.LAST)
.set(HtmlRenderer.INDENT_SIZE, 0)
.set(HtmlRenderer.PERCENT_ENCODE_URLS, true)
.set(Parser.EXTENSIONS, Arrays.asList(
AbbreviationExtension.create(),
TablesExtension.create(),
FootnoteExtension.create(),
AnchorLinkExtension.create(),
TypographicExtension.create(),
SuperscriptExtension.create(),
StrikethroughSubscriptExtension.create(),
EmojiExtension.create(),
AutolinkExtension.create(),
DefinitionExtension.create()
));
public static final Parser PARSER = Parser.builder(OPTIONS).build();
public static final HtmlRenderer RENDERER = HtmlRenderer.builder(OPTIONS).build();
Node doc = markdown.PARSER.parse(md); // md is String of markdown content
System.out.println(markdown.RENDERER.render(doc));Can you explain me Definition Extension options ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels