From 0638b049218d2486265f4f402254b7186acb4322 Mon Sep 17 00:00:00 2001 From: Rene Saarsoo Date: Tue, 8 Mar 2022 18:03:17 +0200 Subject: [PATCH] Add Ramp keyword to syntax highlighter --- src/components/CodeEditor.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/CodeEditor.tsx b/src/components/CodeEditor.tsx index 3a168dd..76077ba 100644 --- a/src/components/CodeEditor.tsx +++ b/src/components/CodeEditor.tsx @@ -5,7 +5,10 @@ import { ValidationError, ZwiftoutException } from "zwiftout"; const highlight = (code: string): string => { return code - .replace(/^(Name|Author|Description|Warmup|Rest|Interval|Cooldown|FreeRide):/gm, "$&") + .replace( + /^(Name|Author|Description|Warmup|Rest|Interval|Cooldown|FreeRide|Ramp):/gm, + "$&", + ) .replace(/-?(\d{1,2}:)?\d{1,2}:\d{1,2}/g, "$&") .replace(/\d+%/g, "$&") .replace(/\d+rpm/g, "$&")