How to pass a parameter in MyLinkResolver Extention?
Is your feature request related to a problem? Please describe. I am trying to pass a parameter to resolveLink method in MyType implementd by LinkResolver, in order to obtain the url address of the filtered url relative to the markdownfile being processed.I don't find any sample do this.I hope you can give me some samples like this,thanks a lot.
@DL-EthanSun, define a new DataKey<> or NullableDataKey<> and pass the value for this key in the options you pass to parser/renderer builder. In the link resolver constructor use passed link resolver context to get the options which will contain all options used to create the parser/renderer.
@DL-EthanSun, note that Document node is also a DataHolder which contains all options used in parser with addition to any values added by the parsing process.
In the link resolver, getOptions() contains options used in the renderer builder while getDocument() contains options used in the parser and any values added during parsing.
Thanks, if I want to loop pass value to LinkResolverType during parsing, what should I do.
So far,I can but do it like this.The HtmlConvertRenderExtension is my extention relative to link resolver.

@DL-EthanSun, I would use the same style for your custom extension as for the other extensions. create should take to arguments since the extension factory is stateless. All state and options are passed in a DataHolder
You should set your options in init() by calling _option.set(YOUR_OPTION_KEY, optionValue)
This way your extension will not break in the future if some optimization is used for caching extension factory instances. Which is allowed because extension factory is assumed stateless, allowing a single instance to be used.