Opened 8 years ago

Closed 8 years ago

Last modified 8 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 by Prajjwol Gautam, 8 years ago

Owner: changed from nobody to Prajjwol Gautam
Status: newassigned

comment:2 by Claude Paroz, 8 years ago

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

comment:3 by Tim Graham, 8 years ago

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 by Prajjwol Gautam, 8 years ago

Resolution: fixed
Status: assignedclosed

comment:5 by Tim Graham, 8 years ago

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