Open huapeng01016 opened 2 years ago
You can provide a list of extensions to add to Pegdown flags:
Here is a function for flexmarkOptions, you have extensions which will be added:
public static DataHolder flexmarkOptions(int pegdownExtensions, Extension... extensions) {
return flexmarkOptions(false, pegdownExtensions, extensions);
}
For example:
final private static DataHolder OPTIONS = PegdownOptionsAdapter.flexmarkOptions(Extensions.ALL, CustomExtension.create());
To add/change option flags you can use the return value and convert it to mutable via .toMutable()
, make your changes and then convert back to immutable via .toImmutable()
For example:
static DataHolder OPTIONS = PegdownOptionsAdapter.flexmarkOptions(
Extensions.ALL,
GitLabExtension.create()
).toMutable()
.set(Parser.LISTS_AUTO_LOOSE, false)
.toImmutable();
I like to use katex and mermaid features in Gitlab extension from my pergdown based application. Is it possible to use both Pegdown and Gitlab extensions. If yes, how to setup the Parser? I am using the standard way in the example to setup the pegdown extensions:
I have not been able to hook in the:
Any help would be greatly appreciated.