fix: releases页面没有加速下载链接的bug
parent
b408fcd0d0
commit
f637200a28
|
@ -50,7 +50,7 @@ module.exports = {
|
|||
'/.*/.*/blame/': {
|
||||
redirect: 'hub.fastgit.org'
|
||||
},
|
||||
'^/[^/]+/[^/]+/?(/releases)?$': {
|
||||
'^/[^/]+/[^/]+(/releases(/.*)?)?$': {
|
||||
script: [
|
||||
'jquery',
|
||||
'github'
|
||||
|
|
|
@ -3,10 +3,10 @@ var expect = require('chai').expect
|
|||
describe('test', function () {
|
||||
// eslint-disable-next-line no-undef
|
||||
it('regexp', function () {
|
||||
const test = '^/[^/]+/[^/]+(/releases)?$'
|
||||
const test = '^/[^/]+/[^/]+(/releases(/.*)?)?$'
|
||||
const reg = new RegExp(test)
|
||||
|
||||
const ret = reg.test('/docmirror/dev-sidecar/releases')
|
||||
const ret = reg.test('/docmirror/dev-sidecar/releases/tag')
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
expect(ret).be.ok
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue