All checks were successful
timw4mail/scroll/pipeline/head This commit looks good
25 lines
402 B
JavaScript
25 lines
402 B
JavaScript
import Ansi from './ansi.ts';
|
|
|
|
export enum HighlightType {
|
|
None,
|
|
Number,
|
|
Match,
|
|
String,
|
|
}
|
|
|
|
export function highlightToColor(type: HighlightType): string {
|
|
switch (type) {
|
|
case HighlightType.Number:
|
|
return Ansi.color256(196);
|
|
|
|
case HighlightType.Match:
|
|
return Ansi.color256(21);
|
|
|
|
case HighlightType.String:
|
|
return Ansi.color256(201);
|
|
|
|
default:
|
|
return Ansi.ResetFormatting;
|
|
}
|
|
}
|