@ovencord/formatters 0.6.3 → 0.6.4
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 +1 -1
- package/src/escapers.ts +4 -4
- package/src/formatters.ts +4 -1
package/package.json
CHANGED
package/src/escapers.ts
CHANGED
|
@@ -131,7 +131,7 @@ export function escapeMarkdown(text: string, options: EscapeMarkdownOptions = {}
|
|
|
131
131
|
spoiler = true,
|
|
132
132
|
codeBlockContent = true,
|
|
133
133
|
inlineCodeContent = true,
|
|
134
|
-
escape = true,
|
|
134
|
+
escape: shouldEscape = true,
|
|
135
135
|
heading = true,
|
|
136
136
|
bulletedList = true,
|
|
137
137
|
numberedList = true,
|
|
@@ -153,7 +153,7 @@ export function escapeMarkdown(text: string, options: EscapeMarkdownOptions = {}
|
|
|
153
153
|
strikethrough,
|
|
154
154
|
spoiler,
|
|
155
155
|
inlineCodeContent,
|
|
156
|
-
escape,
|
|
156
|
+
escape: shouldEscape,
|
|
157
157
|
heading,
|
|
158
158
|
bulletedList,
|
|
159
159
|
numberedList,
|
|
@@ -177,7 +177,7 @@ export function escapeMarkdown(text: string, options: EscapeMarkdownOptions = {}
|
|
|
177
177
|
underline,
|
|
178
178
|
strikethrough,
|
|
179
179
|
spoiler,
|
|
180
|
-
escape,
|
|
180
|
+
escape: shouldEscape,
|
|
181
181
|
heading,
|
|
182
182
|
bulletedList,
|
|
183
183
|
numberedList,
|
|
@@ -190,7 +190,7 @@ export function escapeMarkdown(text: string, options: EscapeMarkdownOptions = {}
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
let res = text;
|
|
193
|
-
if (
|
|
193
|
+
if (shouldEscape) res = escapeEscape(res);
|
|
194
194
|
if (inlineCode) res = escapeInlineCode(res);
|
|
195
195
|
if (codeBlock) res = escapeCodeBlock(res);
|
|
196
196
|
if (italic) res = escapeItalic(res);
|
package/src/formatters.ts
CHANGED
|
@@ -685,7 +685,10 @@ export function email<Email extends string>(
|
|
|
685
685
|
export function email<Email extends string>(email: Email, headers?: Record<string, string | readonly string[]>) {
|
|
686
686
|
if (headers) {
|
|
687
687
|
const searchParams = new URLSearchParams(
|
|
688
|
-
Object.fromEntries(Object.entries(headers).map(([key, value]) => [key.toLowerCase(), value])) as Record<
|
|
688
|
+
Object.fromEntries(Object.entries(headers).map(([key, value]) => [key.toLowerCase(), value])) as Record<
|
|
689
|
+
string,
|
|
690
|
+
string
|
|
691
|
+
>,
|
|
689
692
|
);
|
|
690
693
|
|
|
691
694
|
return `<${email}?${searchParams.toString()}>` as const;
|