1
0
Fork 0
forked from forgejo/forgejo

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>
This commit is contained in:
zeripath 2020-09-05 16:45:10 +01:00 committed by GitHub
parent e80eda7d01
commit 9fdb4f887b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 10381 additions and 10049 deletions

View file

@ -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)