Automagically generated smilies

  • Thread starter Thread starter D H
  • Start date Start date
D H
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Messages
15,524
Reaction score
769
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.
 
Physics news on Phys.org
Greg Bernhardt said:
We can change that
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
 
D H said:
I don't know what the solution is, but this bites when it comes to computer code.
Greg Bernhardt said:
We can change that
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.
 
  • Like
Likes   Reactions: Greg Bernhardt

Similar threads

  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
1K