@social-mail/social-mail-web-server 1.4.875 → 1.4.877

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.4.875",
3
+ "version": "1.4.877",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  import { tokenizeRegex } from "../protocols/core/tokenizer.js";
2
2
 
3
- const tags = /(#((\p{L}[\p{L}\/\x20\d]+(,|;))|(\p{L}[\p{L}\d]*)))/gmiu;
3
+ const tags = /(#\p{L}[\p{L}\d\-_\/]+)/gmiu;
4
4
 
5
5
  export default class Hashtags {
6
6
 
@@ -1,5 +1,6 @@
1
1
  import { RegisterSingleton, ServiceProvider } from "@entity-access/entity-access/dist/di/di.js";
2
2
  import SocialMailContext from "../../model/SocialMailContext.js";
3
+ import { ConsoleLogger } from "@entity-access/entity-access/dist/common/Logger.js";
3
4
 
4
5
  @RegisterSingleton
5
6
  export default class TagService {
@@ -34,6 +35,12 @@ export default class TagService {
34
35
  using scope = ServiceProvider.createScope(this);
35
36
  const db = scope.resolve(SocialMailContext);
36
37
 
38
+ (db as any).logger = new (class extends ConsoleLogger {
39
+ debug(a: any): this {
40
+ console.log(a);
41
+ return this;
42
+ }
43
+ } )();
37
44
  const tag = await db.tags.statements.selectOrInsert({
38
45
  parentID,
39
46
  name,
@@ -21,10 +21,10 @@ export default async function() {
21
21
 
22
22
 
23
23
  set = Hashtags.extract(`
24
- #Tag1 Tag2, #Tag12
24
+ #Tag1_Tag2 #Tag12
25
25
  `);
26
26
  assert.strictEqual(2, set.size);
27
- assert(set.has("#Tag1 Tag2"));
27
+ assert(set.has("#Tag1_Tag2"));
28
28
  assert(set.has("#Tag12"));
29
29
  }
30
30