Automagically generated smilies

1. Nov 17, 2014

D H

Staff Emeritus
A colon followed by a lower case s automagically results in a sad-faced smiley: :s .This means when someone types "std :: string" without the spaces (which is the canonical way to type that), they will get this: std::string.

I don't know what the solution is, but this bites when it comes to computer code.

2. Nov 17, 2014

Greg Bernhardt

We can change that

3. Nov 17, 2014

Staff: Mentor

There are a few other funny cases as well - for example, a simple smiley :) morphs into the jaw-drop smiley if you happen to put it at the end of a naturally parenthesized expression (such as this one

I doubt there is any easy fix for that one, as the three-character sequence is genuinely ambiguous

4. Nov 17, 2014

Staff: Mentor

Maybe make it so that BBcode stuff inside [ code ] tags is ignored.

A different problem comes with C code that has arrays indexed by a variable i. The BBCode parsing turns the bracketed index in a[ i ] into the leading italics tag, and generally screws things up. I had to insert extra spaces here to keep this from happening.