From 47d9dabf9ab55d5715f7e8e6c8b99e2fb70c209e Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Thu, 16 Dec 2021 12:01:59 +0100 Subject: [PATCH] Only lowercase input --- components/REPL/REPLInput.tsx | 3 ++- next-env.d.ts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/REPL/REPLInput.tsx b/components/REPL/REPLInput.tsx index 11b07c4..91a1f69 100644 --- a/components/REPL/REPLInput.tsx +++ b/components/REPL/REPLInput.tsx @@ -15,7 +15,8 @@ const REPLInput: NextPage = ({historyCallback, inputRef}) => { const [justTabbed, setJustTabbed] = React.useState(0); const replinOnChange = (e: React.FormEvent) => { - const currentInput = (e.target as HTMLInputElement).value; + const currentInput = (e.target as HTMLInputElement).value.toLowerCase(); + (e.target as HTMLInputElement).value = currentInput; const suggest = commandCompletion(currentInput); setCurrentCmd(suggest); if (suggest.length === 0) suggest.push(""); diff --git a/next-env.d.ts b/next-env.d.ts index 9bc3dd4..4f11a03 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,5 +1,4 @@ /// -/// /// // NOTE: This file should not be edited