Transform an escaped line found by the ``find()`` classmethod.
(self, lines)
| 383 | return cls(line[ix].start) |
| 384 | |
| 385 | def transform(self, lines): |
| 386 | """Transform an escaped line found by the ``find()`` classmethod. |
| 387 | """ |
| 388 | start_line, start_col = self.start_line, self.start_col |
| 389 | |
| 390 | indent = lines[start_line][:start_col] |
| 391 | end_line = find_end_of_continued_line(lines, start_line) |
| 392 | line = assemble_continued_line(lines, (start_line, start_col), end_line) |
| 393 | |
| 394 | if len(line) > 1 and line[:2] in ESCAPE_DOUBLES: |
| 395 | escape, content = line[:2], line[2:] |
| 396 | else: |
| 397 | escape, content = line[:1], line[1:] |
| 398 | |
| 399 | if escape in tr: |
| 400 | call = tr[escape](content) |
| 401 | else: |
| 402 | call = '' |
| 403 | |
| 404 | lines_before = lines[:start_line] |
| 405 | new_line = indent + call + '\n' |
| 406 | lines_after = lines[end_line + 1:] |
| 407 | |
| 408 | return lines_before + [new_line] + lines_after |
| 409 | |
| 410 | _help_end_re = re.compile(r"""(%{0,2} |
| 411 | (?!\d)[\w*]+ # Variable name |
nothing calls this directly
no test coverage detected