escape markdown (avoid namespace pollution)
Description
gitlab-flavoured markdown keeps adding new shortcuts to create terse, and easy to parse (for humans) textual representation with lots of cross-references. cool.
unfortunately this also means, that an ever growing number of special characters cannot be used for "normal" text anymore. this is especially true, for special characters that have a real-world usage that looks similar to the text-representation in GFM.
it also doesn't really help, that sometimes a reference will expand to a link (if the referenced item exists), and sometimes it stays "as is".
at the time of writing six (6!) characters (@#!$~%
) are overloaded with special meaning (related to gitlab references), making them unusable for other things.
examples:
-
#1
using a hash#
followed by a number is often used to reference enumerations (in gitlab context this could mean enumerations within a given issue, rather than neighboring issues) -
~5
the tilde~
is a common abbreviation forapproximately
-
$10
prefixing a number with currency symbol is often used to denote amounts of money.
Proposal
it would be nice, if cross-references could be escaped easily.
e.g. i currently don't have a way to use "#1 (closed)" without making it either a link to issue#1
(and creating a back-reference there) or marking it as code
(which has a distinct look and meaning).
even better than adding special characters to avoid creating gitlab references, would be have been a generic meta-escape character that starts a gitlab cross-reference. e.g. using #!5
(rather than !5
) to reference MRs.
i don't see any obvious collision (currently #[^0-9]
seems to be forbidden anyhow), but feel free to come up with something better.
Compatibility
obviously there might be compatibility issues with removing special meaning from a given character. but then, i guess you could keep the old behaviour for a while, documenting only the new behaviour (so it gets adopted), and allow the admin to convert all gitlab-references to the new scheme
References
github at least shares the PR and issue namespace, so you can use #
to refer to either of them.