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
I think your dash-handling should be vastly simplified and better match markdown and smartypants (http://daringfireball.net/projects/smartypants/)
I know this should be n-dash, but m has become stylistically used by default, see smartypants config: