summaryrefslogtreecommitdiff
path: root/parser.go
diff options
context:
space:
mode:
authorTed Kornish <tkornish@tableau.com>2018-03-01 11:31:29 -0800
committerTed Kornish <tkornish@tableau.com>2018-03-01 11:31:45 -0800
commitc43616cf3afe84ba8f0e0f1a1fdaf4c425e51d37 (patch)
tree2fe3930bc78b1d3061277670d08f556537a28ecb /parser.go
parent161cb77e537b14c0a460a072a360844391a9cde6 (diff)
Don't parse hyphens in Chars() unless escaped
Diffstat (limited to 'parser.go')
-rw-r--r--parser.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/parser.go b/parser.go
index a612857..7530b3d 100644
--- a/parser.go
+++ b/parser.go
@@ -181,6 +181,8 @@ func parseMatcher(matcher string) (alphabet string, ranges [][]rune) {
}
} else if i+1 < len(runes) && runes[i] == '\\' {
alphabet += string(runes[i+1])
+ } else if runes[i] == '-' {
+ continue
} else {
alphabet += string(runes[i])
}