diff --git a/utils.js b/utils.js index 61ffcac..b016db0 100644 --- a/utils.js +++ b/utils.js @@ -10,7 +10,21 @@ export function markdownLinkRegex(url) { } export function markdownCharEscape(text) { - return text.replaceAll('-', '\\-') + return text + .replaceAll('`', '\\`') + .replaceAll('*', '\\*') + .replaceAll('_', '\\_') + .replaceAll('{', '\\{') + .replaceAll('}', '\\}') + .replaceAll('[', '\\[') + .replaceAll(']', '\\]') + .replaceAll('(', '\\(') + .replaceAll(')', '\\)') + .replaceAll('#', '\\#') + .replaceAll('+', '\\+') + .replaceAll('-', '\\-') + .replaceAll('.', '\\.') + .replaceAll('!', '\\!') } export async function getRSSItemTitle(feedUrl) {