• AndreKR's avatar
    Simple rewrite regex captures (#2592) · 4bad5c79
    AndreKR authored
    * More informative rewrite test output
    
    When running rewrite tests, the output in case of a test failure now
    includes not only the rewritten URLs but also the from URL.
    
    * Move re-escaping to regexpMatches
    
    This commit moves the code to post-process the match replacements from
    ComplexRule to regexpMatches, so it can later be re-used for SimpleRule.
    
    Also changes the comment in an attempt to better explain the reasoning
    behind that code.
    
    The required strings.Replacer is now built only once.
    
    * Support regex captures in simple rewrite rules
    
    Closes #2586
    4bad5c79
rewrite_test.go 5.49 KB