@social-mail/social-mail-web-server 1.8.299 → 1.8.301
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/protocols/core/RegExpExtra.d.ts.map +1 -1
- package/dist/protocols/core/RegExpExtra.js +15 -14
- package/dist/protocols/core/RegExpExtra.js.map +1 -1
- package/dist/server/seed/ui/seed-ui.js +1 -1
- package/dist/server/seed/ui/seed-ui.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/protocols/core/RegExpExtra.ts +23 -14
- package/src/server/seed/ui/seed-ui.ts +1 -1
package/package.json
CHANGED
|
@@ -15,32 +15,41 @@ export const RegExpExtra = {
|
|
|
15
15
|
replaceLinks(input: string, blog = "") {
|
|
16
16
|
return RegExpExtra.replaceAll(
|
|
17
17
|
input,
|
|
18
|
-
/(([^@\s,;]{5,80}@)|([📅📆📆]
|
|
18
|
+
/((?<email>(?<emailPrefix>[^@\s,;]{5,80}@)(?<emailDomain>[^@\s,;]{2,100}))|(?<link>https?:\/\/[^\s]{2,1024})|(?<timeBlock>[📅📆📆]:(?<time>\s{0,5}\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{1,5}Z))|(?<tag>#\p{L}[\p{L}\d\-_\/]{2,200}))/gui,
|
|
19
19
|
({ text, match }) => {
|
|
20
20
|
if (text) {
|
|
21
21
|
return text;
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
const {
|
|
24
|
+
email,
|
|
25
|
+
emailPrefix,
|
|
26
|
+
emailDomain,
|
|
27
|
+
time,
|
|
28
|
+
timeBlock,
|
|
29
|
+
link,
|
|
30
|
+
tag
|
|
31
|
+
} = match.groups;
|
|
32
|
+
if (time) {
|
|
33
|
+
return `<time datetime="${time}">${timeBlock}</time>`;
|
|
27
34
|
}
|
|
28
|
-
// const empty = match[4];
|
|
29
|
-
// if (empty !== null && empty !== void 0) {
|
|
30
|
-
// return empty;
|
|
31
|
-
// }
|
|
32
|
-
const tag = match[4];
|
|
33
35
|
if (tag) {
|
|
34
36
|
if (blog) {
|
|
35
37
|
return `<a href="/${blog}/tag/${tag.substring(1)}" hash-tag="${tag}">${tag}</a>`;
|
|
36
38
|
}
|
|
37
39
|
return `<a href="#${tag.substring(1)}" hash-tag="${tag}">${tag}</a>`;
|
|
38
40
|
}
|
|
39
|
-
if (
|
|
40
|
-
return
|
|
41
|
+
if (link) {
|
|
42
|
+
return `<a href="${link}">${link}</a>`;
|
|
41
43
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
if (email) {
|
|
45
|
+
if (blog) {
|
|
46
|
+
if(emailPrefix) {
|
|
47
|
+
return emailPrefix[0] + "@".padStart(emailPrefix.length - 1, "x") + emailDomain;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return `<a href="mailto:${email}">${email}</a>`;
|
|
51
|
+
}
|
|
52
|
+
return text;
|
|
44
53
|
});
|
|
45
54
|
},
|
|
46
55
|
|
|
@@ -17,7 +17,7 @@ export default async function seedUI(config: DBConfig) {
|
|
|
17
17
|
await config.saveVersion(UIPackageConfig, {
|
|
18
18
|
package: "@social-mail/social-mail-client",
|
|
19
19
|
view: "dist/web/AppIndex",
|
|
20
|
-
version: "1.9.
|
|
20
|
+
version: "1.9.10"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
await config.saveVersion(WebComponentsPackageConfig, {
|