Commit a97000b
committed
fix(highlight): address Copilot review comments on PR #80
- detectLang: perform extension map lookup before Dockerfile check to
prevent false positives (e.g. Dockerfile.ts correctly detected as
TypeScript, Dockerfile.php as PHP)
- PHP tokenizer: use /^#(?!\[)[^\n]*/ for hash comments to avoid
dimming PHP 8+ attribute syntax (#[Route], #[ORM\Entity], etc.)
- Test: assert \x1b[35m magenta on Terraform boolean/null literals
(was only checking text preservation via strip())
- Test: add MAINTAINER to Dockerfile instructions test (present in
regex but was missing from test list)
- Test: add regression for Dockerfile.ts → typescript detection
- Test: add PHP 8+ attribute non-comment assertion1 parent f714b5b commit a97000b
2 files changed
Lines changed: 37 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
528 | 537 | | |
529 | 538 | | |
530 | 539 | | |
| |||
679 | 688 | | |
680 | 689 | | |
681 | 690 | | |
682 | | - | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
683 | 694 | | |
684 | 695 | | |
685 | 696 | | |
| |||
706 | 717 | | |
707 | 718 | | |
708 | 719 | | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
709 | 728 | | |
710 | 729 | | |
711 | 730 | | |
| |||
725 | 744 | | |
726 | 745 | | |
727 | 746 | | |
| 747 | + | |
728 | 748 | | |
729 | 749 | | |
730 | 750 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 26 | + | |
| 27 | + | |
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
| |||
71 | 66 | | |
72 | 67 | | |
73 | 68 | | |
74 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
75 | 81 | | |
76 | 82 | | |
77 | 83 | | |
| |||
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
202 | | - | |
| 208 | + | |
| 209 | + | |
203 | 210 | | |
204 | 211 | | |
205 | 212 | | |
| |||
0 commit comments