diff --git a/files/assets/js/markdown.js b/files/assets/js/markdown.js
index fcb2a7dd8..8be2ae12b 100644
--- a/files/assets/js/markdown.js
+++ b/files/assets/js/markdown.js
@@ -54,7 +54,7 @@ function markdown(t) {
input = input.replace(/\|\|(.*?)\|\|/g, '$1')
input = input.replace(/(\n|^)>([^ >][^\n]*)/g, '$1\>$2')
- const emojis = Array.from(input.matchAll(/:([a-z0-9_\-!#@]{1,36}):(?!\/)/gi))
+ const emojis = Array.from(input.matchAll(/:([a-z0-9_\-!#@]{1,36}):(?![^`]*`)/gi))
if(emojis != null){
for(i = 0; i < emojis.length; i++){
const old = emojis[i][0];
@@ -72,7 +72,7 @@ function markdown(t) {
}
}
- let options = Array.from(input.matchAll(/\s*\$\$([^\$\n]+)\$\$\s*/gi))
+ let options = Array.from(input.matchAll(/\s\$\$([^\$\n]+)\$\$\s*(?![^`]*`)/gi))
if(options != null){
for(i = 0; i < options.length; i++){
const option = options[i][0];
@@ -82,7 +82,7 @@ function markdown(t) {
}
}
- options = Array.from(input.matchAll(/\s*&&([^\$\n]+)&&\s*/gi))
+ options = Array.from(input.matchAll(/\s*&&([^\$\n]+)&&\s*(?![^`]*`)/gi))
if(options != null){
for(i = 0; i < options.length; i++){
const option = options[i][0];
diff --git a/files/helpers/regex.py b/files/helpers/regex.py
index 9d9b8eb0e..46e356502 100644
--- a/files/helpers/regex.py
+++ b/files/helpers/regex.py
@@ -26,9 +26,9 @@ valid_sub_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$", flags=re.A)
query_regex = re.compile("(\w+):(\S+)", flags=re.A)
-poll_regex = re.compile("\s*\$\$([^\$\n]+)\$\$\s*(?![^`]*```)", flags=re.A)
-bet_regex = re.compile("\s*\$\$\$([^\$\n]+)\$\$\$\s*(?![^`]*```)", flags=re.A)
-choice_regex = re.compile("\s*&&([^\$\n]+)&&\s*(?![^`]*```)", flags=re.A)
+poll_regex = re.compile("\s*\$\$([^\$\n]+)\$\$\s*(?![^`]*`)", flags=re.A)
+bet_regex = re.compile("\s*\$\$\$([^\$\n]+)\$\$\$\s*(?![^`]*`)", flags=re.A)
+choice_regex = re.compile("\s*&&([^\$\n]+)&&\s*(?![^`]*`)", flags=re.A)
html_comment_regex = re.compile("", flags=re.A)