Handle '\s' correctly in regexps

This commit is contained in:
Max Brunsfeld 2014-09-07 16:05:43 -07:00
parent 2a9f51790f
commit a46f9d950c
2 changed files with 10 additions and 2 deletions

View file

@ -181,6 +181,12 @@ class PatternParser {
.include('_');
case 'd':
return CharacterSet().include('0', '9');
case 's':
return CharacterSet()
.include(' ')
.include('\t')
.include('\n')
.include('\r');
case 't':
return CharacterSet().include('\t');
case 'n':