Target link for `:help [` produces broken markdown link
Describe the bug
Issuing :help [ produced a rendering issue with the bot's resulting markdown
To Reproduce
Steps to reproduce the behavior:
-
Create a comment in /r/vim containing
:help [ -
Let the bot respond
Expected behavior
Expected a link to the corresponding help-target https://vimhelp.org/index.txt.html#%5B (which it found & created), but the Markdown of the link got messed up. See https://www.reddit.com/r/vim/comments/15lvgi2/what_commonly_used_vim_motionsthemesfeatures_do/jvd80or/
- [] Willing to take up?
This is weird, because the bot definitely produces URL-encoded text. We already have tests for that. Maybe Reddit is changing the URL when posting. I will look into it
I'm getting a similar issue with ] in links as shown in this helpbot reply where the help-link for ]p seems to trigger breakage in the generated Markdown (it finds the correct help-target URL and uses that, just putting the "wrong" thing in the […]() bit of the link causing it to get misinterpreted). Both of these are in Old Reddit, FWIW.
This seems to be the case for old Reddit only. In new Reddit it renders correctly. I think I can circumvent this problem by replacing the brackets with full width square brackets.
This is fixed now