Repository navigation
Commit 7bde652
committed
Keep string and heredoc lines untouched when indenting
php-indent-line forced any heredoc line made of a single identifier to
column zero. That check also matched body lines such as "FROM" in an
SQL heredoc, silently changing the string, and it moved real closing
markers too: since PHP 7.3 the closing marker's indentation is stripped
from every body line, so dedenting it changes the string value as well.
Leave every string, heredoc and nowdoc line as it is, like the CC Mode
based implementation did.
When such a line (or one in an HTML region) is left unchanged, still
move point out of the leading whitespace to the end of the indentation,
matching CC Mode's TAB behavior.1 parent 0e32f79 commit 7bde652
2 files changed
Lines changed: 35 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | 671 | | |
680 | 672 | | |
681 | 673 | | |
682 | 674 | | |
683 | 675 | | |
684 | 676 | | |
685 | | - | |
686 | | - | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
687 | 680 | | |
688 | 681 | | |
689 | 682 | | |
690 | 683 | | |
691 | 684 | | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
701 | 691 | | |
702 | 692 | | |
703 | 693 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
548 | 574 | | |
549 | 575 | | |
550 | 576 | | |
| |||
0 commit comments