Consider this question:

is x-- > 0 && array[x] well defined behavior in c++?

Unfortunately, the question title is displayed on SO as:

is `x— > 0 && array[x]` well defined behavior in c++?

There are two issues here:

  1. Less severe, the backticks are displayed verbatim and don’t delimit a code span. Not very nice but bearable. On the other hand, MathOverflow has this really nice math mode even in titles – why not also introduce this on SO for code?
  2. The -- operator is transformed into an em-dash. This is slightly misleading and simply unnecessary. I am all in favour of using SmartyPants (or whatever SO uses) to glam up the question title typography. But this shouldn’t go at the cost of correctness.

So I suggest allowing limited Markdown in titles (e.g. as in comments?) or at least fixing the formatting bug.

  • 2
    "So I suggest allowing limited Markdown in titles (e.g. as in comments?)" - Agreed – jjnguy Oct 28 '10 at 15:52
  • 4
    Now I'm wondering if I can add em-dash as an alias for the decrement operator in C... – user27414 Oct 28 '10 at 15:55
  • 2
    Probably worth noting that a search for the title as-written still finds the question. The double-dash is converted to an em-dash during rendering, just as the double-ampersand is converted to && - it affects the final display (and possibly Google indexing) but not the internal title. – Shog9 Oct 28 '10 at 21:52
  • +1 because I wanted to italicize a metasyntactic variable on English.SE in a title... and status-declined, schmatus-declined: even gods can change their minds, so there's hope ;-) – Jürgen A. Erhard Feb 8 '11 at 20:57
  • 4
    “Slightly” misleading ? It is totally wrong ! Give that garbage to a C++ compiler, you will see. – Nicolas Barbulesco Dec 7 '13 at 20:26
  • How about providing an escape way ? – Nicolas Barbulesco Dec 7 '13 at 20:29
  • The question title should be "-- -> —, yes or no?" – Paul Draper Sep 9 '15 at 17:00
  • 3
    … for those of us keeping track: More than eight years and ~ 10 duplicate bug reports later, this is still not fixed. – Konrad Rudolph Jan 14 '19 at 16:55

I'm not sure we want markdown in titles. However, I think -- -> — is not appropriate for a programming site.

| improve this answer | |

Even given the current MarkDown support in comments (bold, italic, code, links), the only one of those I would want to have in the question titles is code.

I think, given that SO is a programming site, code is reasonable to allow in titles. Regardless of whether or not this would carry a fixed-width style of some kind, it should disable any character transforms such as -- being converted to an em-dash.

| improve this answer | |

We definitely don't want Markdown in question titles

  • it's too processing intensive
  • it's additional complexity and overkill IMO

And how do we tell the difference between these two titles:

How do I "accept" an answer-- where do I click?


is x-- > 0 && array[x] well defined behavior in c++?

| improve this answer | |
  • 4
    So you are going to leave the functionality that converts -- to ? – jjnguy Oct 28 '10 at 21:29
  • 11
    Neither of those titles contain code -- auto-code-interpretation is way too much. Allow it within backquotes and that's it. – Jon Seigel Oct 28 '10 at 22:25
  • 7
    trivial: there is no difference. Let the users be explicit: only filter out backtick-delimited sections. This should be straightforward (and is already done for $…$ on other SE sites). – Konrad Rudolph Oct 29 '10 at 7:23
  • 1
    Or give us another delimiter to use in titles besides backtick? – jcolebrand Feb 7 '11 at 18:31
  • 2
    What is $...$? – John Bachir Feb 16 '11 at 17:19
  • 5
    Markdown in titles too processor-intensive? We just need a backtick in the titles to delimit code - it's trivial to implement! And I'm sure it's not processor intensive, it can't be. – Camilo Martin Jan 7 '12 at 23:18
  • 1
    @Camilo, indeed, if it's processor intensive, then do it in Javascript like SO already does in the preview window. "Performance" is a canard. – Kirk Woll Nov 22 '12 at 7:03
  • You force the user to type How do I "accept" an answer -- where do I click?, with an extra space, as suggested here – Eric Aug 16 '13 at 15:57
  • How do we tell the difference ? By thinking. With a human brain. – Nicolas Barbulesco Dec 7 '13 at 20:30
  • 12
    You can't tell. So don't substitute characters. If the author uses a hyphen, show a hyphen. If the author uses an em dash, show an em dash. If the author uses a ☂, show a ☂. – Paul Draper Sep 9 '15 at 7:58
  • @PaulDraper Do you mean "If the author uses a ☂, show a ☂," – Spikatrix Sep 9 '15 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .