chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -4,8 +4,7 @@ const INLINE_SIMPLE_COMMAND_ALIASES = new Map<string, string>([
|
||||
["/whoami", "/whoami"],
|
||||
["/id", "/whoami"],
|
||||
]);
|
||||
const INLINE_SIMPLE_COMMAND_RE =
|
||||
/(?:^|\s)\/(help|commands|whoami|id)(?=$|\s|:)/i;
|
||||
const INLINE_SIMPLE_COMMAND_RE = /(?:^|\s)\/(help|commands|whoami|id)(?=$|\s|:)/i;
|
||||
|
||||
const INLINE_STATUS_RE = /(?:^|\s)\/(?:status|usage)(?=$|\s|:)(?:\s*:\s*)?/gi;
|
||||
|
||||
@@ -29,9 +28,6 @@ export function stripInlineStatus(body: string): {
|
||||
} {
|
||||
const trimmed = body.trim();
|
||||
if (!trimmed) return { cleaned: "", didStrip: false };
|
||||
const cleaned = trimmed
|
||||
.replace(INLINE_STATUS_RE, " ")
|
||||
.replace(/\s+/g, " ")
|
||||
.trim();
|
||||
const cleaned = trimmed.replace(INLINE_STATUS_RE, " ").replace(/\s+/g, " ").trim();
|
||||
return { cleaned, didStrip: cleaned !== trimmed };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user