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

Remove additional backticks from inline code #2033

Merged
merged 1 commit into from
Jul 14, 2021
Merged

Remove additional backticks from inline code #2033

merged 1 commit into from
Jul 14, 2021

Conversation

domdfcoding
Copy link
Contributor

Unbalanced backticks appear in the rendered HTML, as do any additional backticks if there are more than two.

For example:
Selection_308

@gvanrossum
Copy link
Member

@hugovk Should we update the linter to catch these?

@gvanrossum gvanrossum merged commit 5cedff4 into python:master Jul 14, 2021
@domdfcoding domdfcoding deleted the backticks branch July 14, 2021 19:40
@hugovk
Copy link
Member

hugovk commented Jul 16, 2021

It might be a bit tricky to come up with a regex pattern to match. For example, how about three backticks in a row?

But PEP 612 uses backticks for valid section title underlines:

$ git grep "\`\`\`" pep-0612.rst
pep-0612.rst:````````````
pep-0612.rst:```````````````````
pep-0612.rst:````````````````````````````
pep-0612.rst:`````````
pep-0612.rst:```````````````````
pep-0612.rst:`````````

Then how about three backticks with a non-backtick on one side? But PEPs 501 and 502 have these:

$ git grep "\`\`\`" pep-050*.txt
pep-0501.txt:only with the backtick based ``\`cat $filename\``` syntax replaced by
pep-0502.txt:such as the "Backtick" (or grave accent `````) are also

@gvanrossum
Copy link
Member

Okay, fair. But it makes me think we should perhaps invest in a proper linter.

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

Successfully merging this pull request may close these issues.

4 participants