RPTools / maptool

Virtual Tabletop for playing roleplaying games with remote players or face to face.

Home Page:http://rptools.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature]: Enable setting of HTML attributes via markdown and markdownToHtml()

Baaaaaz opened this issue · comments

Describe the Problem

When using markdownToHtml() function I'm not able to set ids, classes, or other attributes in markdown script to be incorporated into the processed HTML output.

The Solution you'd like

Add the extension https://github.com/vsch/flexmark-java/tree/master/flexmark-ext-attributes to the to markdownToHtml() function and enable all its goodness.

Alternatives that you've considered.

Writing HTML in the markdown script in order to set the attributes, which defeats the purpose of using markdown in the first place.

Additional Context

No response

I'm not personally a fan of markdown so I'm not aware of what's available.
Bearing that in mind, constructing feature sets from various libraries ad-hoc seems less useful than plumbing in a library that is fully featured and copes with different dialects. Are there any off-the-shelf options that could be used without too much pain?

Not sure about the ad-hoc bit in this case! As doesn't MapTool already use the flexmark library and some of its extensions already in markdownToHtml? i.e. https://github.com/RPTools/maptool/blob/release-1.14/src/main/java/net/rptools/maptool/client/functions/MarkDownFunctions.java