From c32680a643534107871d192473773c62f43f79de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Thu, 6 Jan 2022 12:14:02 +0100 Subject: [PATCH] fixed emoji regex. --- client/src/components/markdown.ts | 2 +- docs/changelog.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/markdown.ts b/client/src/components/markdown.ts index d5c846a..984df4f 100644 --- a/client/src/components/markdown.ts +++ b/client/src/components/markdown.ts @@ -201,7 +201,7 @@ const rules: MarkdownRules = { }, emoji: { order: md.defaultRules.strong.order, - match: (source) => /^:([a-zA-z_-]*):/.exec(source), + match: (source) => /^:([^:\s]+):/.exec(source), parse(capture) { return { id: capture[1], diff --git a/docs/changelog.md b/docs/changelog.md index db58b15..ff1838c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,7 @@ ### Bugs - Fixed fullscreen incompatibility for Safari [#121](https://github.com/m1k1o/neko/issues/121). +- Fixed bad emoji matching for e.g. `:+1:` and `:100:` with new regex `/^:([^:\s]+):/`. ### New Features - Added `m1k1o/neko:microsoft-edge` tag.