Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dash handling #6

Open
jamienk opened this issue Apr 22, 2014 · 3 comments
Open

Dash handling #6

jamienk opened this issue Apr 22, 2014 · 3 comments

Comments

@jamienk
Copy link

jamienk commented Apr 22, 2014

I think your dash-handling should be vastly simplified and better match markdown and smartypants (http://daringfireball.net/projects/smartypants/)

  • Two hyphens should turn to m-dash
    I know this should be n-dash, but m has become stylistically used by default, see smartypants config:
#  1  ->  "--" for em-dashes; no en-dash support  
#  2  ->  "---" for em-dashes; "--" for en-dashes 
  • No space before or after required (this is a style question and people can add spaces if they want, but your current way leaves the non-spacers in the lurch)
  • Quotes after dash should be correct, e.g.,:
He said--and I couldn't stop him--"No!" <--Opening quote should be correct
@jamienk jamienk mentioned this issue Apr 22, 2014
@danyaPostfactum
Copy link
Owner

Strange...It seems I've lost my comment here. I tried to post some time ago:

I would rather mimic Word behavior:

He said--and I couldn't stop him -> He said—and I couldn't stop him (em dash)
He said -- and I couldn't stop him -> He said – and I couldn't stop him (en dash)
He said - and I couldn't stop him -> He said – and I couldn't stop him (the same as prevous)

Mostly done in 5eac066

@jamienk
Copy link
Author

jamienk commented Apr 28, 2014

I have this issue:

She said--and I quote

two dashes get replaced with mdash after I type "and "

She said--she's the one

two dashes don't get converted after "she's "

I suspect this has to do with Firefox putting line breaks (\n?) after the quotes? #7

@jamienk
Copy link
Author

jamienk commented Apr 28, 2014

This seems to work now with the refactoring. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants