Project

General

Profile

« Previous | Next » 

Revision 4788

review: Don't remove XML functions that are unit conversions

View differences:

review
33 33
        r'', xpath)
34 34
    if n > 0: truncated = True
35 35
    
36
    # Remove XML functions
37
    xpath = re.sub(r'/_\w+/\w+', r'', xpath)
36
    # Remove XML functions other than unit conversions
37
    xpath = re.sub(r'/_(?!\w+_to_)\w+/\w+', r'', xpath)
38 38
    
39 39
    # Remove backward (child-to-parent) pointer's target ID attr
40 40
    xpath = re.sub(r'\[[\w*]+\]|(?<=\[)[\w*]+,', r'', xpath)

Also available in: Unified diff