Prepare for highlighting search results
All checks were successful
timw4mail/scroll/pipeline/head This commit looks good

This commit is contained in:
Timothy Warren 2024-03-01 16:04:25 -05:00
parent 9d45cf9296
commit faf59b4235

View File

@ -3,6 +3,7 @@ import Ansi from './ansi.ts';
export enum HighlightType { export enum HighlightType {
None, None,
Number, Number,
Match,
} }
export function highlightToColor(type: HighlightType): string { export function highlightToColor(type: HighlightType): string {
@ -10,6 +11,9 @@ export function highlightToColor(type: HighlightType): string {
case HighlightType.Number: case HighlightType.Number:
return Ansi.color256(196); return Ansi.color256(196);
case HighlightType.Match:
return Ansi.color256(21);
default: default:
return Ansi.ResetFormatting; return Ansi.ResetFormatting;
} }