mintchaos / typogrify

A set of Django template filters to make caring about typography on the web a bit easier.
http://static.mintchaos.com/projects/typogrify/
Other
168 stars 29 forks source link

--- (3 dashes) should be converted to a single mdash #46

Open xuhdev opened 8 years ago

xuhdev commented 8 years ago

Currently, the following lines produces an mdash and a dash:

from typogrify.filters import typogrify
print(typogrify("---"))

prints

—-

but it really should print a single mdash---otherwise how to produce an ndash? See the wikipedia to read more details.

justinmayer commented 8 years ago

I think we could possibly add support for converting --- to an em-dash, but I do not think we will change the -- conversion behavior to produce an en-dash. Using -- as a proxy for an em-dash is too deeply ingrained in traditional text behaviors, as well as mainstream operating systems that automatically replace -- with an em-dash.

When I want an en-dash, I use the en-dash itself in the source content. Seems to work fine.

xuhdev commented 8 years ago

OK, thanks... Maybe we should just support 3 dashes...

justinmayer commented 4 years ago

For folks using Markdown, the SmartyPants extension in Python-Markdown already handles this.