summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dlclark/regexp2/syntax
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-09-05 16:45:10 +0100
committerGitHub <noreply@github.com>2020-09-05 11:45:10 -0400
commit9fdb4f887b65a6ddacefc8c7e4580e333d7e4b95 (patch)
treeaa666649a9cac194bb189bcdc1ab7bc1e7ea6bfb /vendor/github.com/dlclark/regexp2/syntax
parente80eda7d01ca0ea06e48f6f2fc22b174c5a5c91a (diff)
downloadgitea-9fdb4f887b65a6ddacefc8c7e4580e333d7e4b95.tar.gz
gitea-9fdb4f887b65a6ddacefc8c7e4580e333d7e4b95.zip
Update to go-org 1.3.2 (#12728)
* Update to go-org 1.3.2 Fix #12727 Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix unit test Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'vendor/github.com/dlclark/regexp2/syntax')
-rw-r--r--vendor/github.com/dlclark/regexp2/syntax/parser.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/dlclark/regexp2/syntax/parser.go b/vendor/github.com/dlclark/regexp2/syntax/parser.go
index f13f779cf6..be88e2eede 100644
--- a/vendor/github.com/dlclark/regexp2/syntax/parser.go
+++ b/vendor/github.com/dlclark/regexp2/syntax/parser.go
@@ -1250,10 +1250,10 @@ func (p *parser) scanBasicBackslash(scanOnly bool) (*regexNode, error) {
return nil, nil
}
- if p.useOptionE() || p.isCaptureSlot(capnum) {
+ if p.isCaptureSlot(capnum) {
return newRegexNodeM(ntRef, p.options, capnum), nil
}
- if capnum <= 9 {
+ if capnum <= 9 && !p.useOptionE() {
return nil, p.getErr(ErrUndefinedBackRef, capnum)
}
@@ -1808,11 +1808,11 @@ func (p *parser) scanOctal() rune {
i := 0
d := int(p.rightChar(0) - '0')
for c > 0 && d <= 7 {
- i *= 8
- i += d
- if p.useOptionE() && i >= 0x20 {
+ if i >= 0x20 && p.useOptionE() {
break
}
+ i *= 8
+ i += d
c--
p.moveRight(1)