vmg / sundown

Standards compliant, fast, secure markdown processing library in C
1.99k stars 385 forks source link

- (single dash) is transformed into en dash #38

Closed steverandy closed 13 years ago

steverandy commented 13 years ago

Dashes (“--” and “---”) supposedly are transformed into en- and em-dash entities. However Redcarpet with :smart option transforms - (single dash) into en dash and -- (double dash) into em dash. Therefore there is no way to inset normal dash (-).

vmg commented 13 years ago

Actually, the dash replacement that the original SmartyPants does was configured at runtime, and had 3 possible options (2 of them being quite random/stupid).

It is true, however, that the behavior that Sundown had was broken, and that single-dashes should never be replaced. I've changed it so -- is translated to en-dash and --- to em-dash. This is the same behavior as SmartyPants with option "2", and the same behavior as Tex. I think this is the most reasonable choice.

Cheers!