File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ interface ParseToken {
2424 background: Color | null ;
2525 // A Set of the applied decorations
2626 decorations: Set <DecorationType >;
27+ // Offset from the beginning of the input value
28+ offset: number ;
2729}
2830```
2931
Original file line number Diff line number Diff line change @@ -2,10 +2,16 @@ import { Color, namedColors } from './colors';
22import { DecorationType , decorations } from './decorations' ;
33
44export interface ParseToken {
5+ /** The text content of the token. */
56 value : string ;
7+ /** The foreground color */
68 foreground : Color | null ;
9+ /** The background color. */
710 background : Color | null ;
11+ /** A Set of the applied decorations. */
812 decorations : Set < DecorationType > ;
13+ /** Offset from the beginning of the input value. */
14+ offset : number ;
915}
1016
1117function findSequence ( value : string , position : number ) {
@@ -172,6 +178,7 @@ export function createAnsiSequenceParser() {
172178 foreground,
173179 background,
174180 decorations : new Set ( decorations ) ,
181+ offset : position ,
175182 } ) ;
176183 }
177184
You can’t perform that action at this time.
0 commit comments