Browse Source

update url re (again)

master
Amélia Liao 3 years ago
parent
commit
72f0ce9ce5
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      src/jsx.ts
  2. +1
    -1
      src/main.tsx

+ 1
- 0
src/jsx.ts View File

@ -98,6 +98,7 @@ export class JSX {
}
static createElement<T>(fn: (props: T) => HtmlEnt, props: T, ...content: Content[]): HtmlEnt;
static createElement(name: string, props: ElemProps, ...content: Content[]): HtmlEnt;
static createElement<P, T extends JSXName<P>>(name: T, arg: T extends 'string' ? ElemProps : P, ...content: Content[]): HtmlEnt {
if (typeof name !== 'string') {
return name(arg);


+ 1
- 1
src/main.tsx View File

@ -33,7 +33,7 @@ type IrcMessage = {
content: MessageFrag[]
};
const URL = /https?:\/\/(\w|[\&\%\.\/\?\=\-\#])+/;
const URL = /(((?:https?|gopher):\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/|spotify:track:)((?:\(?[^\s()<>]+\)?)*[^ \s`!\[\]{};:\'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/i;
function parseMessage(m: string): MessageFrag[] {
m = m.trimEnd();


Loading…
Cancel
Save