From 6c22b2e3de821a808f5c3147dc31459c45e312df Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 23 Jul 2023 16:27:57 +0200 Subject: [PATCH] src/mkhelp: strip off escape sequences At some point the nroff command stopped stripping off escape sequences, so then this script needs to do the job instead. Reported-by: VictorVG on github Fixes #11501 --- src/mkhelp.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mkhelp.pl b/src/mkhelp.pl index ba2e7c1d400d40..19a30e2c812d8d 100755 --- a/src/mkhelp.pl +++ b/src/mkhelp.pl @@ -51,6 +51,7 @@ # remove trailing CR from line. msysgit checks out files as line+CRLF $line =~ s/\r$//; + $line =~ s/\x1b\x5b[0-9]+m//g; # escape sequence if($line =~ /^([ \t]*\n|curl)/i) { # cut off headers and empty lines $wline++; # count number of cut off lines