Remove annoying nested if
@@ -121,17 +121,11 @@ func stringState(fileJob *FileJob, index int, endPoint int, stringTrie *Trie, en
return i, currentState
}
- // If we are in a literal string we want to ignore the \ check
- if ignoreEscape {
+ // If we are in a literal string we want to ignore the \ check OR we aren't checking for special ones
+ if ignoreEscape || fileJob.Content[i-1] != '\\' {
if ok, _, _ := stringTrie.Match(fileJob.Content[i:]); ok != 0 {
return i, SCode
}
- } else {
- if fileJob.Content[i-1] != '\\' { // ONLY do this check IF we aren't checking for special ones
- if ok, _, _ := stringTrie.Match(fileJob.Content[i:]); ok != 0 {
- return i, SCode
- }
- }
}
}
