Skip to content

Commit 7517f2f

Browse files
committed
chore: format
1 parent c295a4b commit 7517f2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/strings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,14 +541,14 @@ export function parseCustomReplacements(text: string): Map<string, string> {
541541
*
542542
* @param {string} text - The text to unescape the markdown special characters in.
543543
* @return {string} The text with the markdown special characters unescaped.
544-
*
544+
*
545545
* @example
546546
* ```ts
547547
* unescapeMarkdownSpecialCharacters('Escape \\[\\_\\]'); // Escape [_]
548548
* ```
549549
*/
550550
export function unescapeMarkdownSpecialCharacters(text: string): string {
551-
return text.replace(/(\\+)([!"#$%&'()*+,-./:;<=>?@\[\\\]^_`{|}~])/g, (_, backslashes, specialChar) => {
551+
return text.replace(/(\\+)([!"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~])/g, (_, backslashes, specialChar) => {
552552
const backslashCount = backslashes.length;
553553
const keepCount = Math.floor(backslashCount / 2);
554554
return '\\'.repeat(keepCount) + specialChar;

0 commit comments

Comments
 (0)