Преглед изворни кода

Don't escape formatting in code

close #146
Markus-Rost пре 4 година
родитељ
комит
f6cd818ff8
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      util/functions.js

+ 2 - 1
util/functions.js

@@ -280,7 +280,8 @@ function htmlToDiscord(html, serverpath = '', ...escapeArgs) {
 		ontext: (htmltext) => {
 			if ( !reference ) {
 				if ( href && !code ) htmltext = htmltext.replace( /[\[\]]/g, '\\$&' );
-				text += escapeFormatting(htmltext, ...escapeArgs);
+				if ( code ) text += htmltext.replace( /`/g, 'ˋ' );
+				else text += escapeFormatting(htmltext, ...escapeArgs);
 			}
 		},
 		onclosetag: (tagname) => {