mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
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 E = require('../enums')
|
||||||
|
|
||||||
const reURI = /^irc\:\/\/(.*)\/([a-zA-Z0-9]*)/
|
const reURI = /^irc\:\/\/(.*)\/([a-zA-Z0-9\-\[\]\\\`\_\^\{\|\}]*)/
|
||||||
|
|
||||||
const processURI = (uri) => {
|
const processURI = (uri) => {
|
||||||
const match = uri.match(reURI)
|
const match = uri.match(reURI)
|
||||||
|
@ -63,6 +63,10 @@ const tests = [
|
||||||
uri: 'irc://chat.ircserver.org/alice?param=123',
|
uri: 'irc://chat.ircserver.org/alice?param=123',
|
||||||
shouldMatch: true,
|
shouldMatch: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
uri: 'irc://chat.ircserver.org/alice_bob',
|
||||||
|
shouldMatch: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
uri: 'https://chat.ircserver.org/alice',
|
uri: 'https://chat.ircserver.org/alice',
|
||||||
shouldMatch: false,
|
shouldMatch: false,
|
||||||
|
|
Loading…
Reference in a new issue