Commit b15158a6a2edb7981364a9333585e24496a8da63
Fix regex for invitation port substitution
Andre Staltz committed on 2/22/2017, 10:35:42 PMParent: ccd0d595c8b584eb26db96e7aeb24171c1aadbaa
Files changed
src/index.ts | changed |
src/index.ts | ||
---|---|---|
@@ -101,9 +101,9 @@ | ||
101 | 101 … | if (err) { |
102 | 102 … | console.error(err); |
103 | 103 … | process.exit(1); |
104 | 104 … | } else { |
105 | - invitation = invitation.replace(/(?=[^\:]*\:)(\d+)(?=\:)/g, `${PUBLIC_PORT}`); | |
105 … | + invitation = invitation.replace(/\:(\d+)\:/g, `:${PUBLIC_PORT}:`); | |
106 | 106 … | const qrCode = qr.svgObject(invitation) as QRSVG; |
107 | 107 … | res.render('invited', { |
108 | 108 … | invitation: invitation, |
109 | 109 … | qrSize: qrCode.size, |
Built with git-ssb-web