Revision ecabe27e
b/lib/utils/text.py | ||
---|---|---|
383 | 383 |
num_b = len(e1) - len(e1.rstrip("\\")) |
384 | 384 |
if num_b % 2 == 1 and slist: |
385 | 385 |
e2 = slist.pop(0) |
386 |
# here the backslashes remain (all), and will be reduced in |
|
387 |
# the next step |
|
388 |
rlist.append(e1 + sep + e2) |
|
386 |
# Merge the two elements and push the result back to the source list for |
|
387 |
# revisiting. If e2 ended with backslashes, further merging may need to |
|
388 |
# be done. |
|
389 |
slist.insert(0, e1 + sep + e2) |
|
389 | 390 |
continue |
391 |
# here the backslashes remain (all), and will be reduced in the next step |
|
390 | 392 |
rlist.append(e1) |
391 | 393 |
# finally, replace backslash-something with something |
392 | 394 |
rlist = [re.sub(r"\\(.)", r"\1", v) for v in rlist] |
Also available in: Unified diff