borismus / markdown-preview

Enables Chrome to render markdown files as HTML
http://smus.com
217 stars 42 forks source link

Replace `--` with `—` #3

Closed zachwill closed 12 years ago

zachwill commented 12 years ago

Not sure if my code snippet belongs in the markdownify.js file — I could always move it to showdown.js.

But, with Posterous' markdown converter, I know double dashes are replaced with — HTML entities, so I added a line to do the same.

borismus commented 12 years ago

Why is posterous behavior the one we should imitate? What does the command line converter do?

zachwill commented 12 years ago

Just looked. Gruber's SmartyPants turns -- to – and --- to —. The command line converter does not imitate this behavior, though.

If this is implemented, checks for -- and --- would need to be made after converting the Markdown — that way horizontal rules aren't overridden.

borismus commented 12 years ago

I'd rather keep this as is. If you feel strongly about it, I think this is better fixed at the showdown.js level: https://github.com/coreyti/showdown