MCDReforged/PluginCatalogue

handle external markdown files links with relative path

Closed this issue · 4 comments

Currently, external markdown files' links are written by scripts, but relative path used in links are not handled. However, github can handle these links with relative path, but it would be better to add handling for it to improve simplicity and stability.

Example:

This plugin supports [FastAPI MCDR](https://github.com/AnzhiZhang/MCDReforgedPlugins/tree/master/src/bot/../fastapi_mcdr) plugin, please refer to the source code for detailed API, or run and view the FastAPI document via `http://127.0.0.1:8080/docs`.

See Also:

c426edc

What is your expected behavior for this feature request? It seems to work as intended since the example markdown link you showed is untouched

As mentioned above, simplify links with relative path, e.g.

https://github.com/AnzhiZhang/MCDReforgedPlugins/tree/master/src/bot/../fastapi_mcdr

will be simplified to

https://github.com/AnzhiZhang/MCDReforgedPlugins/tree/master/src/fastapi_mcdr

It is really necesary at all? Urls with related paths aready work correctly without any issue. Unnecessary simplification will add more complexity onto the rewriter code

Not necesary, GitHub will handle links like that. It's totally depends on you