hukkin / mdformat-gfm

Mdformat plugin for GitHub Flavored Markdown compatibility
MIT License
13 stars 2 forks source link

[feature request] Add WikiLink #32

Closed shellRaining closed 8 months ago

shellRaining commented 9 months ago

very thanks for your useful plugin first! these days I encounter some trouble when formating wikiLink markdown file, for example

[[some page]]

after format this file, this change to

\[\[hello\]\]

the wikiLink not work properly now...

github wiki now support this format , can you add this feature?

KyleKing commented 9 months ago

Thanks for the issue! I have some time this week and can investigate

KyleKing commented 8 months ago

Interesting, so it looks like the GFM spec (https://github.github.com/gfm) does not have wiki links, but when you have the "Markdown" format selected when editing a Wiki page they are converted to internal links anyway and you don't have to switch to something like the MediaWiki edit mode (https://www.mediawiki.org/wiki/Help:Formatting from wikicloth of https://github.com/github/markup).

Given that the wiki links don't appear to be documented as part of GFM, my first thought is that the feature would need to be a separate package to support users who want the strict implementation of GFM.

However, you're in luck because a package already seems to exist and you can use it today: https://github.com/tmr232/mdformat-wikilink 🎉

Let me know if mdformat-wikilink solves your issue

shellRaining commented 8 months ago

yes, it does work! but I don't see this plugin in mdformat docs, so maybe I should take a pr for it 😄