Proper markdown for bracket commands
Closed this issue · 4 comments
https://www.reddit.com/r/vim/comments/m736j3/-/gr9l8x8
When referring to commands with brackets like [I
in the above example, the markdown formatting breaks. It's not critical because the link stays visible anyways, but easily circumvented by putting a \
before the [
s and ]
s in the command.
The isssue I mean looks like this
and happens on some reddit platforms.
It does not happen on new reddit in the browser (for me at least) so it's probably expected that the other platforms (except for old reddit, of course) would want to work towards that. I noticed the issue on boost on android.
You could change the formatting for queries that contain []
from monospaced to escaped brackets, but that too isn't guarandeed to work everywhere.
Apparently escaping with '' does not work with backticks. This is a tricky one.
I encountered a similar ]
-related issue that renders incorrectly on old and new reddit:
Responding to:
:h `]
Yields:
* [``]`](https://vimhelp.org/motion.txt.html#%60%5D) in _motion.txt_
More correct markdown would be:
* [\`\]](https://vimhelp.org/motion.txt.html#%60%5D) in _motion.txt_
However, that's missing the fixed width
styling. But I'm not sure that styling is worth keeping in these tricky corner cases?
Looking at OP's issues, neither of these render correctly on old reddit:
* [`\[I`](https://vimhelp.org/tagsrch.txt.html#%5BI) in _tagsrch.txt_
* [`[I`](https://vimhelp.org/tagsrch.txt.html#%5BI) in _tagsrch.txt_
But this does:
* [\[I](https://vimhelp.org/tagsrch.txt.html#%5BI) in _tagsrch.txt_
Seems like help terms containing []
or ` should give up the fixed width and use escaping. Especially since markdown parsers are often inconsistent (don't old and new reddit's have different quirks?). Using simpler markdown is more likely to display properly for more users.
This is fixed now