12

I tried editing a recent Stack Overflow post with an em-dash in the title. When I tried to fix it, I discovered the post actually contained two hyphen-minus (-) characters in the first place – and that these were being converted to an em-dash (—) character for displaying the question.

It seems that these issues are due to titles using a stripped-down version of Smarty formatting.

This is the same bug reported in Do not replace two hyphens with em dash and Don't change double-hyphens in titles into dashes.

This issue was originally raised back in 2010 and the author’s request to allow “limited Markdown in titles” was declined.

Since this bug continues to crop up, I’d like to propose a simpler (and less ambiguous) solution: Disable the Smarty-like formatting in titles (at least on programming sites such as Stack Overflow).

In the most recent case, the question author clearly intended two hyphen-minus (-) characters to be displayed. If someone actually wants typographic dashes to be displayed, they can compose their question in a good text editor that allows them to explicitly insert UTF-8 characters (FWIW, I use the ItsAllText Firefox extension with Vim as my editor).

7

I am in favor of this, SmartyPants-like formatting is an annoyance.

If people want to write typographically correct characters they should use an input method that supports that on their systems.

I use the X11 compose key, on Windows there is a nice program called WinCompose and alternatives exist on all platforms. (For example on Android I use HackersKeyboard which also has a compose key!).

The SmartyPants formatting is trying to fix a solved problem. Unicode allows us to write everything without any magic replacement.

The one thing Unicode does not solve is code formatting, but we do have markdown for that.

0

I would rather prefer to allow Markdown in titles.

As for the example, I think it would make more sense to have double dashes shown as inline code like this --. Because in this context, double dashes are essentially code and not text.

You must log in to answer this question.

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