Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#27102 closed Bug (duplicate)

simplify_regex is not cleaning up any outstanding regex-y character

Reported by: Prajjwol Gautam Owned by: Prajjwol Gautam
Component: contrib.admindocs Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If you try cleaning up a regex pattern involving groups, simplify_regex fails to remove a bracket.

Steps to reproduce:
run this in your shell:
django.contrib.admindocs.views.simplify_regex('^orgs/(?P<org_id>([0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}))$')
output:
'/orgs/<org_id>)'

expected output:
'/orgs/<org_id>'

Change History (5)

comment:1 Changed 6 years ago by Prajjwol Gautam

Owner: changed from nobody to Prajjwol Gautam
Status: newassigned

comment:2 Changed 6 years ago by Claude Paroz

Needs tests: set
Triage Stage: UnreviewedAccepted
Version: 1.8master

comment:3 Changed 6 years ago by Tim Graham

Needs tests: unset

The test in the pull request is fixed by the PR for #26621 so this ticket might be considered a duplicate.

comment:4 Changed 6 years ago by Prajjwol Gautam

Resolution: fixed
Status: assignedclosed

comment:5 Changed 6 years ago by Tim Graham

Resolution: fixedduplicate
Note: See TracTickets for help on using tickets.
Back to Top