Commit 18dbc0b
committed
Improve worst-case performance of inline.text regex
The old regex may take quadratic time to scan for potential line
breaks or email addresses starting at every point. Fix it to avoid
scanning from points that would have been in the middle of a previous
scan.
Signed-off-by: Anders Kaseorg <[email protected]>1 parent ba1de1e commit 18dbc0b
2 files changed
+4
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
549 | | - | |
| 549 | + | |
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
| 618 | + | |
622 | 619 | | |
623 | 620 | | |
624 | 621 | | |
| |||
630 | 627 | | |
631 | 628 | | |
632 | 629 | | |
633 | | - | |
| 630 | + | |
634 | 631 | | |
635 | 632 | | |
636 | 633 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
| 144 | + | |
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
| |||
0 commit comments