Merge lp://staging/~therp-nl/openupgrade-addons/7.0-wiki-nobacktracking-regex into lp://staging/openupgrade-addons

Proposed by Holger Brunn (Therp)
Status: Merged
Merged at revision: 8174
Proposed branch: lp://staging/~therp-nl/openupgrade-addons/7.0-wiki-nobacktracking-regex
Merge into: lp://staging/openupgrade-addons
Diff against target: 55 lines (+32/-8)
1 file modified
document_page/migrations/7.0.1.0.1/post-migration.py (+32/-8)
To merge this branch: bzr merge lp://staging/~therp-nl/openupgrade-addons/7.0-wiki-nobacktracking-regex
Reviewer Review Type Date Requested Status
Ronald Portier (Therp) code review and test Approve
Pedro Manuel Baeza code review Approve
Sandy Carter (http://www.savoirfairelinux.com) (community) code review, no test Approve
Review via email: mp+238872@code.staging.launchpad.net

Description of the change

This branch avoids using regexes in cases where backtracking can become so expensive that it seems like a deadlock, i.e. with

re.compile("'''''(([^']|([^']'{0,4}[^']))+)'''''").sub("<b><i>\1</i></b>", "'''''test'''' hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world")

Note that this occurs with all regexes of this kind in the case it's a malformed wiki syntax

To post a comment you must log in.
Revision history for this message
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote :

LGTM +1

review: Approve (code review, no test)
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

LGTM

review: Approve (code review)
Revision history for this message
Ronald Portier (Therp) (rportier1962) wrote :

Tested conversion in a separate function and code review

review: Approve (code review and test)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches