-
Notifications
You must be signed in to change notification settings - Fork 527
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
Fix #57 -- SmartyPants handling of single quotes. #200
Conversation
Hang on please, there is a bug in this pull request that I need to fix... |
E.g. if the original text is "test'test".
Okay, it's good to go |
Your branch has a broken git clone https://github.com/mmorearty/redcarpet.git
cd redcarpet
git checkout patch-single-quotes
bundle install
rake
|
Same error when trying to install the built gem:
|
That's weird; I have no idea why I didn't hit that compile error sooner. Sorry; fixed. |
Looks good. I built a Redcarpet::Markdown.new(Redcarpet::Render::SmartyHTML).render("<p>testing's 'quote's and <code>code's code</code></p>")
#=> "<p>testing’s ‘quote’s and <code>code's code</code></p>\n" |
+1 |
@mmorearty : Could you rebase your commit please? 😄 I can't merge it automatically. If you want me to do it manually, let me know. It looks good to me. Thanks a lot! |
Conflicts: ext/redcarpet/buffer.h
@mmorearty : Sorry it was a merge conflict, your commits were correctly squashed ; I allow myself to merge it locally. Thanks a lot for this contribution! |
Great, thanks @robin850 ! |
git bisect
indicates that the single quote bug was introduced in commit ad2c7fe. The problem is that by the time quotation marks are being converted,'
has already been changed into'
, and the code to convert that into a smart quote is only looking for'
, not'
.There was already code to handle the fact that
"
had been converted into"
, but it appears that single-quotes were overlooked.