docs icon indicating copy to clipboard operation
docs copied to clipboard

MediaWiki link instructions are backwards

Open chreliot opened this issue 3 years ago • 6 comments

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/communities/documenting-your-project-with-wikis/editing-wiki-content

What part(s) of the article would you like to see updated?

In this section, we find the instruction:

With MediaWiki syntax, the link syntax is [[nameofwikipage|Link Text]].

This was changed from [[Link Text|nameofwikipage]] in commit 7e6f2f4c8bfc592447e10590aba63cbc85e1f643 in August 2022, which attempted to address issue #19312. I believe this change was a mistake.

Indeed, the current documentation conforms to the format prescribed in the external documentation at Mediawiki.org.

However, it does not reflect how MediaWiki links function in GitHub wikis. I believe it was correct before. (That is, GitHub has implemented MediaWiki links in the opposite order from how MediaWiki itself does them.)

MediaWiki links do not work when the displayed text comes second, as [[nameofwikipage|Link Text]]. They only work with the displayed text first and link second ([[Link Text|nameofwikipage]].

I have posted a minimal example on my GitHub wiki here.

Please consider reverting 7e6f2f4c8bfc592447e10590aba63cbc85e1f643 ?

Additional information

No response

chreliot avatar Apr 03 '23 18:04 chreliot

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

welcome[bot] avatar Apr 03 '23 18:04 welcome[bot]

@chreliot Thanks for opening a new issue and providing all this extra context! ✨

I'll get this triaged for review! :zap:

cmwilson21 avatar Apr 04 '23 14:04 cmwilson21

👋🏼 @chreliot, thanks again for spotting this and providing an example! You're right, this syntax should be reverted. For this update, we'll want to change the sentence on MediaWiki syntax from

- With MediaWiki syntax, the link syntax is [[nameofwikipage|Link Text]].

to

- With MediaWiki syntax, the link syntax is [[Link Text|nameofwikipage]].

You or anyone else is welcome to open a PR to address this issue. Thanks again for pointing this out! ✨

sabrowning1 avatar Jun 02 '23 16:06 sabrowning1

I would happy to contribute on this.

codewithdev avatar Jun 11 '23 08:06 codewithdev

👋 @codewithdev, good to see you again! Looks like we have an open PR with this fix waiting for review. In the mean time, please take a look at our help wanted section to find other open issues you can work on! 👍

cmwilson21 avatar Jun 12 '23 13:06 cmwilson21

Closing this out since it was fixed in https://github.com/github/docs/pull/25881, thanks again for pointing this out @chreliot!

sabrowning1 avatar Jun 12 '23 19:06 sabrowning1