File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1183,7 +1183,7 @@ func (r *Runner) RunEnumeration() {
11831183
11841184 //nolint:errcheck // this method needs a small refactor to reduce complexity
11851185 if plainFile != nil {
1186- plainFile .WriteString (stripANSI (resp .str ) + "\n " )
1186+ plainFile .WriteString (handleStripAnsiCharacters (resp .str , r . options . NoColor ) + "\n " )
11871187 }
11881188
11891189 if len (r .options .ExcludeOutputFields ) > 0 {
@@ -1348,6 +1348,13 @@ func (r *Runner) RunEnumeration() {
13481348 }
13491349}
13501350
1351+ func handleStripAnsiCharacters (data string , skip bool ) string {
1352+ if skip {
1353+ return data
1354+ }
1355+ return stripANSI (data )
1356+ }
1357+
13511358func logFilteredErrorPage (fileName , url string ) {
13521359 dir := filepath .Dir (fileName )
13531360 if ! fileutil .FolderExists (dir ) {
You can’t perform that action at this time.
0 commit comments