-
Notifications
You must be signed in to change notification settings - Fork 260
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
Apostrophes in contractions are not converted to right single quote #39
Comments
It appears that the single quote (identical to apostrophe in Markdown input) is not converted as intended in the following case. Source text (note the period at the end):
Expected:
Actual result:
Let me know if I should create a separate issue for this. |
@bryanforbes Typographer extension is just a typographer extension is not SmartyPants exntension. Typographer extension does not support your case. @sungchang-ha I can not reproduce this. |
@yuin I should've provided the test string as-is, which I edited to no avail. It appears that the combination of inline styles (bold, italic, etc.) and the adjacent punctuation mark causes the issue. Test environment is Goldmark 1.1.8 and the made-up test string is shown below:
Removing either of the inline style or the adjacent punctuation mark makes it rendered as quotes. |
@sungchang-ha Reasonable. Typographer extension is implemented with same algorithm as Emphasis and strong emphasis defined in CommonMark. Left flanking is converted into I'm not usually writing English, so this functionalities has low priority for me. |
Do you mean that converting apostrophes to single right quote will not be supported ever, or that converting them is currently unsupported? |
@bryanforbes Converting them is currently unsupported. As wrote above, I'm not usually writing English and honestly say I never used this functionality. I do not have so much time for this project, so I'm going to use the time for better supporting CJK environment instead of typographer that I have never used. I welcome PR that enhances typographer(or adds complete SmartyPants extension). |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Before trying to fix the cases where Typographer doesn't work properly, is an inline parser the correct model for this transformation? To fix this, we would need to have the plain text without formatting. E.g., |
@rgov goldmark is an extensible markdown parser, so we can not know about information of user-assigned extension(ast nodes, syntax, html output, etc). Furthermore, users can remove or replace built-in parsers and renderers. If users remove a built-in emphasis parser, your example should yield I think parsing html output is the only way that you perfectly apply smartypants substitutions. |
I've tried to fix this in 3393022. |
For the following text:
Currently,
'
is not converted to’
for contractions when the typography extension is enabled, but smartypants does. I would expect the output to be:The text was updated successfully, but these errors were encountered: