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

PEP 362: Fix formatting of colons in field descriptions #2590

Merged
merged 1 commit into from May 8, 2022

Conversation

davidfstr
Copy link
Contributor

@davidfstr davidfstr commented May 8, 2022

Before:
Screen Shot 2022-05-08 at 12 05 35 PM

After:
Screen Shot 2022-05-08 at 12 06 04 PM

Copy link
Member

@AA-Turner AA-Turner left a comment

Looks OK, but I am mystified as to why the colons & trailing text are being stripped... it seems very odd behaviour for list-item handling.

Edit: perhaps as it interacts with the definition list behaviour?

A

@JelleZijlstra JelleZijlstra merged commit 7557f19 into python:main May 8, 2022
4 checks passed
@CAM-Gerlach
Copy link
Member

@CAM-Gerlach CAM-Gerlach commented May 8, 2022

Edit: perhaps as it interacts with the definition list behaviour?

That was my guess, and the reST spec seems to confirm that, but its odd that its triggering for an enumerated list...

Optional classifiers may follow the term on the same line, each after an inline " : " (space, colon, space). Inline markup is parsed in the term line before the classifier delimiters are recognized. A delimiter will only be recognized if it appears outside of any inline markup.

   term 3 : classifier
      Definition 3.

Syntax diagram:

+----------------------------+
| term [ " : " classifier ]* |
+--+-------------------------+--+
   | definition                 |
   | (body elements)+           |
   +----------------------------+

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

Successfully merging this pull request may close these issues.

None yet

4 participants