aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-14 20:24:17 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-14 20:24:17 -0400
commite822187f8a69a171bea001dc0bfa396179a009cb (patch)
tree0eab7569c59121732c23db5232ed2edc70641f98 /src
parent7027ef3ea331c3aecbfb902695d7ed5ff7e9e7cb (diff)
downloadtanzanite-e822187f8a69a171bea001dc0bfa396179a009cb.tar.gz
tanzanite-e822187f8a69a171bea001dc0bfa396179a009cb.tar.bz2
tanzanite-e822187f8a69a171bea001dc0bfa396179a009cb.zip
reexport escapeMarkdown
Diffstat (limited to 'src')
-rw-r--r--src/lib/common/util/Format.ts14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/lib/common/util/Format.ts b/src/lib/common/util/Format.ts
index 5188c2b..ff34745 100644
--- a/src/lib/common/util/Format.ts
+++ b/src/lib/common/util/Format.ts
@@ -6,8 +6,7 @@ import {
escapeCodeBlock as discordEscapeCodeBlock,
escapeInlineCode as discordEscapeInlineCode,
escapeItalic as discordEscapeItalic,
- escapeMarkdown as discordEscapeMarkdown,
- EscapeMarkdownOptions,
+ escapeMarkdown,
escapeSpoiler as discordEscapeSpoiler,
escapeStrikethrough as discordEscapeStrikethrough,
escapeUnderline as discordEscapeUnderline,
@@ -85,15 +84,6 @@ export function spoiler(content: string): string {
}
/**
- * Escapes any Discord-flavour markdown in a string.
- * @param text Content to escape
- * @param options Options for escaping the markdown
- */
-export function escapeMarkdown(text: string, options?: EscapeMarkdownOptions): string {
- return discordEscapeMarkdown(`${text}`, options);
-}
-
-/**
* Formats input: makes it bold and escapes any other markdown
* @param text The input
*/
@@ -117,3 +107,5 @@ export function sanitizeWtlAndControl(str: string) {
// eslint-disable-next-line no-control-regex
return `${str}`.replace(/[\u0000-\u001F\u007F-\u009F\u200B]/g, '');
}
+
+export { escapeMarkdown } from 'discord.js';