From b5e8c4d52b4c502e80cc1416acb42a2e6403d14f Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Fri, 1 Dec 2023 22:04:28 +0100 Subject: [PATCH] fixed wrong description of replace step --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 4e02bc4..f8b4eb7 100644 --- a/main.go +++ b/main.go @@ -43,7 +43,7 @@ func main() { for i := 0; i < len(line); i++ { forwardReplacedLine += string(line[i]) - // replace found digit by its non-word counterpart (e.g. "one" -> "1") + // replace all potential spelled out digits by their non-word counterpart (e.g. "one" -> "1") for key, val := range reMap { forwardReplacedLine = strings.ReplaceAll(forwardReplacedLine, key, val) } @@ -58,7 +58,7 @@ func main() { backwardReplacedLine = string(line[i]) + backwardReplacedLine } - // replace found digit by its non-word counterpart (e.g. "one" -> "1") + // replace all potential spelled out digits by their non-word counterpart (e.g. "one" -> "1") for key, val := range reMap { backwardReplacedLine = strings.ReplaceAll(backwardReplacedLine, key, val) }