@@ -31,17 +31,18 @@ type EscapeStatus struct {
3131
3232// Or combines two EscapeStatus structs into one representing the conjunction of the two
3333func (status EscapeStatus ) Or (other EscapeStatus ) EscapeStatus {
34- status .Escaped = status .Escaped || other .Escaped
35- status .HasError = status .HasError || other .HasError
36- status .HasBadRunes = status .HasBadRunes || other .HasBadRunes
37- status .HasControls = status .HasControls || other .HasControls
38- status .HasSpaces = status .HasSpaces || other .HasSpaces
39- status .HasMarks = status .HasMarks || other .HasMarks
40- status .HasBIDI = status .HasBIDI || other .HasBIDI
41- status .BadBIDI = status .BadBIDI || other .BadBIDI
42- status .HasRTLScript = status .HasRTLScript || other .HasRTLScript
43- status .HasLTRScript = status .HasLTRScript || other .HasLTRScript
44- return status
34+ st := status
35+ st .Escaped = st .Escaped || other .Escaped
36+ st .HasError = st .HasError || other .HasError
37+ st .HasBadRunes = st .HasBadRunes || other .HasBadRunes
38+ st .HasControls = st .HasControls || other .HasControls
39+ st .HasSpaces = st .HasSpaces || other .HasSpaces
40+ st .HasMarks = st .HasMarks || other .HasMarks
41+ st .HasBIDI = st .HasBIDI || other .HasBIDI
42+ st .BadBIDI = st .BadBIDI || other .BadBIDI
43+ st .HasRTLScript = st .HasRTLScript || other .HasRTLScript
44+ st .HasLTRScript = st .HasLTRScript || other .HasLTRScript
45+ return st
4546}
4647
4748// EscapeControlString escapes the unicode control sequences in a provided string and returns the findings as an EscapeStatus and the escaped string
0 commit comments