forked from Mirrors/doipjs
Fix IRC nickname regex
This commit is contained in:
parent
f5ea4c05bf
commit
3d99d2373d
1 changed files with 5 additions and 1 deletions
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
const E = require('../enums')
|
||||
|
||||
const reURI = /^irc\:\/\/(.*)\/([a-zA-Z0-9]*)/
|
||||
const reURI = /^irc\:\/\/(.*)\/([a-zA-Z0-9\-\[\]\\\`\_\^\{\|\}]*)/
|
||||
|
||||
const processURI = (uri) => {
|
||||
const match = uri.match(reURI)
|
||||
|
@ -63,6 +63,10 @@ const tests = [
|
|||
uri: 'irc://chat.ircserver.org/alice?param=123',
|
||||
shouldMatch: true,
|
||||
},
|
||||
{
|
||||
uri: 'irc://chat.ircserver.org/alice_bob',
|
||||
shouldMatch: true,
|
||||
},
|
||||
{
|
||||
uri: 'https://chat.ircserver.org/alice',
|
||||
shouldMatch: false,
|
||||
|
|
Loading…
Reference in a new issue