-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Revisit the set of disallowed characters in a file type indicator #2140
Comments
I think I prefer #2. I think failing to switch from I don't see any real advantages of having the less restrictive options here, and the simplicity of the rule in addition to the ability to catch a wide variety of possible typos or syntax confusions seems reasonable to motivate the restruction. |
I'm slightly motivated to allow For reference, in GitHub-Flavored Markdown, an info string following a ``` fence cannot contain ` characters at all, but an info string following a ~~~ fence can contain any characters (other than newline), and "```c#" is valid in GFM to start a C#-formatted code block. |
I'm a bit split on |
The leads have converged on option (2) for the time being. We'll keep an eye open for this decision causing issues (such as the |
#1360 changed multiline string literals from using
"""
to using'''
as delimiters, but it left this rule alone:This doesn't seem like an appropriate restriction any more. Maybe one of these options would be more useful:
'
and#
, so that for example#'''#
doesn't run onto the next line, in case it was intended to be some kind of raw character literal.'
and#
, but only at the start of the file type indicator.'
throughout and#
at the start.'''
plus N hashes) from appearing within the string literal after the first character and before the first newline.Some examples:
The text was updated successfully, but these errors were encountered: