8000 Infra: Improve email and link processing and rendering in headers by CAM-Gerlach · Pull Request #2467 · python/peps · GitHub
[go: up one dir, main page]

Skip to content

Infra: Improve email and link processing and rendering in headers #2467

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

Merged
Prev Previous commit
Next Next commit
Infra: Use simpler check for title in Discourse URL header processing
  • Loading branch information
CAM-Gerlach committed Apr 17, 2022
commit ebed4ce897c112f3d15b4ba6706fc607addb3068
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,7 @@ def _process_discourse_url(parts: list[str]) -> tuple[str, str]:
f"{'/'.join(parts)} not a link to a Discourse thread or category")

first_subpart = parts[4]
try:
int(first_subpart)
except ValueError:
has_title = True
else:
has_title = False
has_title = not first_subpart.isnumeric()

if "t" in parts:
item_type = "post" if len(parts) > (5 + has_title) else "thread"
Expand Down
0