quote:
Originally posted by NanaFreak
the best bet is to just do it as the message is sent...
also with your regex you want:
javascript code:
var texCode = Message.replace(/\$\$/g, "$");
Ahh, I was already trying regex but I forgot about the \$ instead of just $
Thanks!
And (according to ryxdp) any emoticons in the message will be replaced by their shortcut, so even if the user is typing emoticons such as f
, the latex will still read f(x
) correctly. It's only a little annoying to the user writing the latex, but he can just turn his emoticons off manually I guess...