diff --git a/public/scripts/showdown-underscore.js b/public/scripts/showdown-underscore.js index 78a1adef7..cea67cf00 100644 --- a/public/scripts/showdown-underscore.js +++ b/public/scripts/showdown-underscore.js @@ -8,8 +8,16 @@ export const markdownUnderscoreExt = () => { return [{ type: 'lang', - regex: new RegExp('\\b(?$1', + regex: new RegExp('(`{1,3}).*?\\1|\\b(?${italicContent}`; + } + }, }]; } catch (e) { console.error('Error in Showdown-underscore extension:', e);