Is SOFU planning to implement some more typographic goodies?

I mean, Markdown is wonderful, but Markdown with SmartyPants sounds like awesomeness itself:

SmartyPants can perform the following transformations:

  • Straight quotes ( " and ' ) into “curly” quote HTML entities
  • Backticks-style quotes (``like this'') into “curly” quote HTML entities
  • Dashes (“--” and “---”) into en- and em-dash entities
  • Three consecutive dots (“...”) into an ellipsis entity

(I, myself, especially miss dashes.)

Is this a way to go?

  • 1
    Do we really have a demand for these transformations?
    – animuson StaffMod
    Commented May 20, 2012 at 22:41
  • 5
    If you really want those in your posts, you can already use named HTML entities (–, —, …, ...). And the quote transformation might just be a problem on a site that deals with code.
    – a cat
    Commented May 20, 2012 at 22:45
  • 2
    These sound like really cool improvements for Markdown in general, but I'm not sure whether they are needed on the Stack Overflow family of sites, where conversation tends to be very technical. Maybe on specific offsprings like English.SE or Literature.SE, but other than that, I'm not sure.
    – Pekka
    Commented May 20, 2012 at 22:47
  • 1
    @animuson, @Pekka: while I can live without proper quotes on SO, i surprisingly often miss em dash. With all this nice design, putting two dashes in post feels like sin. @lunboks I do use — and I do feel the pain as it breaks the readability of source code, especially if---like me---you prefer use dashes without spaces around. Commented May 20, 2012 at 22:55
  • 1
    Fair enough..... +1
    – Pekka
    Commented May 20, 2012 at 22:59
  • 5
    On a mac, en (–) and em (—) dashes can be input with option - and option _ respectively. Commented May 20, 2012 at 23:30
  • 1
    @yoda It's not about inputting en (–) and em (—), it's rather meant as translation somewhere between source and presentation layer. It might be a kind of workaround, although I'm not sure everyone would accept this. The source should stay as 7-bit as possible for as long as possible———at least on IT part of SOFU. Commented May 20, 2012 at 23:47
  • @AloisMahdal I know... it was more to address the comment that — is cumbersome/makes the source hard to read. Not really a solution to what you're proposing, but I use this and it's the same number of key presses :) Commented May 21, 2012 at 0:01
  • In Jekyll, one has to directly input the characters using unicode. I copy and paste the endash from fileformat.info/info/unicode/char/2013/index.htm
    – koppor
    Commented Dec 22, 2016 at 5:27

1 Answer 1


Of course it sounds good - Markdown and SmartyPants are siblings!

That said, this is likely to cause more problems than it solves, in particular on sites where -- and "..." have specific meanings not shared with – and “…”...

var horrible = “3”;
var terrible = –horrible;


SyntaxError: Unexpected token ILLEGAL

Note that titles already offer a stripped-down version of Smarty formatting:

  • Straight quotes (' and ") into “curly” ‘ and “ entities
  • Dashes (-- and ---) into &emdash; entity
  • Three consecutive dots (...) into … entity
  • 3
    But SmartyPants promised not to touch "<pre>, <code>, <kbd>, or <script> tag blocks"! Come on... (I hope he meant MD code blocks and backtick notation as well.) And only a horrible programmer would put actual code out of such... Commented May 20, 2012 at 23:38
  • 2
    And I see that your "horrible" code is forged. IIUC SmartyPants does not actually touch the source, while your code is outright wrong. Or you are trying to point out copy-pasting problem? Commented May 20, 2012 at 23:43
  • Only thing I'd be afraid of is the backticks (2nd bullet point in OP), although I believe it's already addressed somehow (I dont have real experience with SmartyPants yet...) Commented May 20, 2012 at 23:50
  • Yes, I'm pointing out that if you paste Smarty-mangled code directly into a program it's unlikely to work (var horrible="3";var terrible=--horrible; is valid JavaScript, albeit terrible and horrible). It's an easy problem to avoid, so long as any potentially-sensitive text is marked up as such - but in spite of all our efforts to encourage this, there's no guarantee that every expression will be... And -- looks different enough from – to be confusing.
    – Shog9
    Commented May 21, 2012 at 0:58
  • Problems you point out are not of SmartyPants, but of any notation including Markdown itself. If someone is sloppy and foolish enough to c&p a def __init__(self) (which makes the init just bold in MD---not in comments, though) from somebody sloppy enough not to escape it properly in the first place, they deserve the consequences. Even nice programming code can be a horrible Markdown, that's why we have four spaces in the first place. Also, do you really think that not being able to "guarrantee" that foolish people won't do foolish things is a valid reason? Commented Sep 23, 2013 at 14:05
  • 1
    @Alois: one person posting something that looks dumb is foolishness on the part of that person. Implementing a system that routinely makes posts from many different people look dumb is foolishness on the part of that implementation. SO originally rolled out with rules for Markdown that made keywords and symbols found in code look bad, in contexts where they were part of the explanation and not the code - this was pretty quickly identified as a naive implementation and corrected.
    – Shog9
    Commented Sep 23, 2013 at 16:08

You must log in to answer this question.

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