Commit 5a92830
committed
fix: ANSI parser now correctly renders green colors in SVG
The parser split ANSI codes like into
individual elements but compared each element
against the full string , which never matched. No
ANSI colors were ever rendered - all text was white.
Now uses index-based parsing: detects → reads next two
elements (, ) to extract the 256-color number.
Changes visible in demo SVG:
- , , , , , , → green
- Unselected items, prompts → light green
- Selected items, headings → bold white
- Commands → white with green prefix1 parent c4d8633 commit 5a92830
2 files changed
Lines changed: 43 additions & 37 deletions
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| |||
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
67 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
68 | 77 | | |
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
0 commit comments