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

"cmark --smart" incorrectly converts straight quote to "‘" rather than "’" #227

Closed
giucal opened this issue Aug 8, 2017 · 1 comment

Comments

@giucal
Copy link

giucal commented Aug 8, 2017

Given the test source

Test of [cmark]'s `--smart` option. There's something wrong.

[cmark]: http://commonmark.org

cmark --smart produces

<p>Test of <a href="http://commonmark.org">cmark</a>‘s <code>--smart</code> option. There’s something wrong.</p>

whereas the correct output would be

<p>Test of <a href="http://commonmark.org">cmark</a>’s <code>--smart</code> option. There’s something wrong.</p>

The problem is that the first straight quote (in [cmark]'s) is erroneously converted into an opening single quote (&lsquo;) instead of an apostrophe (&rsquo;).

As far as I can tell, this happens whenever

  • a 'x follows a non-alphanumeric character (as in ]'x, "'x, or *'x) and
  • there is a subsequent straight quote at the right boundary of a word (as in x'x or x').
@jgm jgm closed this as completed in b9c7a49 Aug 9, 2017
@jgm
Copy link
Member

jgm commented Aug 9, 2017

Thanks for the report!

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