Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At sign and hash escaping is not possible #181

Open
JustAnotherArchivist opened this issue Feb 28, 2020 · 2 comments
Open

At sign and hash escaping is not possible #181

JustAnotherArchivist opened this issue Feb 28, 2020 · 2 comments

Comments

@JustAnotherArchivist
Copy link

I'm trying to use an at sign followed by something that looks like a username (but is not a GitHub username and should not cause a user notification) or a hash followed by a number that is not a reference to an issue (and should not produce a link). I noticed that it is not possible to prevent GitHub from parsing it as a username or issue reference, respectively, except by using pre-formatted text.

According to the spec's backslash escapes rules, it should be possible to use \@ to get an at sign or \# to get a hash. However, \@github still yields @github, and \#181 still results in #181.

Other things I've tried:

As expected, additionally also escaping the & as & does not yield anything useful.

Please let me know if this is not the right place to report this. It is surprisingly difficult to find where to report issues on GitHub itself.

@JustAnotherArchivist
Copy link
Author

JustAnotherArchivist commented Feb 28, 2020

Enter an awful workaround: @​github → @​github (or ​). It's awful in particular because copying the resulting text will of course also include the zero-width space.

And here's another version that does not work: @github@github

@tidoust
Copy link

tidoust commented Dec 1, 2020

Another slightly less awful workaround is to use an empty comment: @<!-- -->github gets rendered as @github and the comment disappears in the rendered code, so copy-paste works as intended on the resulting text.

I note that this bug also affects internal references in GitHub Wiki pages (not in issues): there is no clean way to escape [[foo]] in such pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants