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

Plural possessives (Typographer extension) #180

Closed
brycewray opened this issue Jan 1, 2021 · 28 comments · Fixed by #280
Closed

Plural possessives (Typographer extension) #180

brycewray opened this issue Jan 1, 2021 · 28 comments · Fixed by #280
Labels
good first issue Good for newcomers help wanted Extra attention is needed pinned issue should not be closed by stalebot

Comments

@brycewray
Copy link

This issue occurs with the Typographer extension in Hugo — including the most recent release, 0.80.0 — if goldmark is the selected parser. It doesn’t occur if Blackfriday is the selected parser and “smart” punctuation is activated. I have complied with the @yuin requirement for Hugo users to bring up such issues in the Hugo repo before doing so here (gohugoio/hugo#8099).

Consider the following text in a Markdown file:

John's dog is named Sam. The Smiths' dog is named Rover.

Expected result: Each apostrophe should be a “smart”/curly apostrophe (’), given the default behavior of goldmark’s Typographer extension.

Actual result: Only the singular possessive (John's dog) has the “smart”/curly apostrophe, while the plural possessive (Smiths' dog) has the “dumb”/straight apostrophe (').

Thanks in advance for any help or consideration this issue may receive.

@thegreatsunra
Copy link

I can confirm that I'm seeing this issue when using plural possessives with the latest version of Hugo (currently 0.80.0).

In my testing, Hugo 0.74.3 (which uses Goldmark 1.1.31) "smartens" plural possessive primes as smart "curly" quotes as expected, but Hugo 0.75.0 (which adopted Goldmark 1.2.1) is where it stopped working.

Hugo 0.80.0 still uses Goldmark 1.2.1. Probably worth checking if this issue is resolved with Goldmark 1.3.1.

@brycewray
Copy link
Author

I can confirm that I'm seeing this issue when using plural possessives with the latest version of Hugo (currently 0.80.0).

In my testing, Hugo 0.74.3 (which uses Goldmark 1.1.31) "smartens" plural possessive primes as smart "curly" quotes as expected, but Hugo 0.75.0 (which adopted Goldmark 1.2.1) is where it stopped working.

Hugo 0.80.0 still uses Goldmark 1.2.1. Probably worth checking if this issue is resolved with Goldmark 1.3.1.

Interesting info. Thanks, @thegreatsunra. gohugoio/hugo#8099

@thegreatsunra
Copy link

Hugo 0.80.0 still uses Goldmark 1.2.1. Probably worth checking if this issue is resolved with Goldmark 1.3.1.

I cloned Hugo locally, updated ./go.mod to reference github.com/yuin/goldmark v1.3.1 and built the hugo executable from that source.

I created a test page in Markdown with the content John's dog is named Sam. The Smiths' dog is named Rover. and confirmed that, even with Goldmark 1.3.1, the singular possessive is "smartened" while the plural possessive is not.

@moorereason
Copy link
Contributor

The typography extension hasn't changed since v1.1.33 (3c3d448), so Hugo's use of v1.2.1 is likely irrelevant.

@thegreatsunra
Copy link

thegreatsunra commented Jan 4, 2021

I cloned Hugo locally, updated ./go.mod to reference github.com/yuin/goldmark v1.3.1 and built the hugo executable from that source.

I've gone through each version of Goldmark this way, building and testing the hugo executable, and I'm pretty sure the plural possessive "no longer smartening" regression was introduced in Goldmark 1.1.32.

Goldmark 1.1.31 smartens plural possessives as expected. Goldmark 1.1.32 (and all subsequent versions) does not.

@thegreatsunra
Copy link

thegreatsunra commented Jan 4, 2021

Ahh, yes: v1.1.31...v1.1.32

With Goldmark 1.1.32 the counter seems to throw things off:

# input
John's dog is named Sam. The Smiths' dog is named Rover.
# output (smartens John's)
John’s dog is named Sam. The Smiths' dog is named Rover.

# input
Johns dog is named Sam. The Smiths' dog is named Rover.
# output (smartens nothing)
Johns dog is named Sam. The Smiths' dog is named Rover.

# input
'Johns dog is named Sam. The Smiths' dog is named Rover.'
## output (smartens 'Johns and Smiths')
‘Johns dog is named Sam. The Smiths’ dog is named Rover.'

# input
'John's dog is named Sam. The Smiths' dog is named Rover.'
## output (smartens 'John's and Smiths')
‘John’s dog is named Sam. The Smiths’ dog is named Rover.'

@yuin
Copy link
Owner

yuin commented Jan 29, 2021

In Japan, there aren't many opportunities to write English. Honestly say, I'm not familiar with English.
I welcome PR from native English writers.

@brycewray
Copy link
Author

brycewray commented Jan 29, 2021

In Japan, there aren't many opportunities to write English. Honestly say, I'm not familiar with English.
I welcome PR from native English writers.

@yuin, great to hear! I am not able to code for a PR but I will create a list of similar typographer issues so whoever can code for a PR can use it as a guideline. Maybe the same code can fix them all.

Edit: Decided the list would be better as an actual site showing the issues, so have put up https://gm-typographer.vercel.app/ as a minimal example.

@brycewray
Copy link
Author

FWIW, Hugo 0.81.0 was just released, which updates the Goldmark version to 1.1.32; so I guess it'll be a while before this gets resolved.

@stale
Copy link

stale bot commented Mar 21, 2021

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.

@stale stale bot added the stale label Mar 21, 2021
@brycewray
Copy link
Author

To my knowledge, the problem remains.

@stale stale bot removed the stale label Mar 21, 2021
@brycewray
Copy link
Author

Hugo 0.82.0 is out. Since the release notes don't mention Goldmark at all, presumably it's still using 1.1.32. Just FYI.

@brycewray
Copy link
Author

Hugo 0.83.1 is out with a bug fix for 0.83.0, which was released the day before. The release notes for 0.83.0 say it now uses Goldmark 1.35; this issue still persists (see https://gm-typographer.vercel.app/).

@stale
Copy link

stale bot commented Jun 2, 2021

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.

@stale stale bot added the stale label Jun 2, 2021
@skyfaller
Copy link

skyfaller commented Jun 2, 2021

Can we please get rid of the stale bot? I'm fine with commenting to prevent the issue from going stale, but it seems like unnecessary noise if there has been no change in the situation.

For the record, I am still experiencing this issue in Hugo v0.83.1. Here's my (possibly inferior) version of the test page: https://www.maximumethics.dev/blog/2021/03/smart-quotes/

@stale stale bot removed the stale label Jun 2, 2021
@brycewray
Copy link
Author

Issue is still present in Hugo 0.84.0, which uses Goldmark 1.3.8.

@brycewray
Copy link
Author

Issue is still present in Hugo 0.85.0, which uses Goldmark 1.3.9.

@stale
Copy link

stale bot commented Aug 4, 2021

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.

@stale stale bot added the stale label Aug 4, 2021
@stale stale bot closed this as completed Aug 13, 2021
@skyfaller
Copy link

This issue is still present in Hugo 0.87.0, which uses Goldmark v1.4.0.

I still hate stale bot.

@brycewray
Copy link
Author

@skyfaller at this point, I am convinced this is not going to be resolved. What complicates that is the fact that Hugo 0.87.0 deprecated Blackfriday so it's pretty much Goldmark or nothing going forward.

@skyfaller
Copy link

skyfaller commented Aug 14, 2021

I posted a plea for help on the Hugo forum, maybe that will attract someone with the necessary coding chops: https://discourse.gohugo.io/t/smart-quotes-do-not-work-properly-in-hugo-with-goldmark/34266

@natemoo-re
Copy link
Contributor

natemoo-re commented Sep 21, 2021

👋🏻 Hey folks! I'm maintaining a WASM wrapper of Goldmark for Deno (https://deno.land/x/goldmark). I got some feedback from @brycewray that this was a blocker, so I'm going to try to take a crack at a PR!

@brycewray
Copy link
Author

Still present in Hugo 0.89.0, which uses Goldmark 1.4.2 (https://github.com/gohugoio/hugo/releases/tag/v0.89.0).

@brycewray
Copy link
Author

Still present in Hugo 0.89.3, which uses Goldmark 1.4.3.

Updated demo.

@yuin yuin added pinned issue should not be closed by stalebot and removed stale labels Nov 24, 2021
@yuin yuin reopened this Nov 24, 2021
@yuin yuin added good first issue Good for newcomers help wanted Extra attention is needed labels Nov 24, 2021
@brycewray
Copy link
Author

@yuin Thank you so much for pinning this, removing the "Stale" label, and setting a "Help wanted" label!

@brycewray
Copy link
Author

Hugo 0.93.0 with goldmark 1.4.7 definitely fixed all issues I’d previously reported; see the newly updated version of my test site. Outstanding!

@arif254
Copy link

arif254 commented Mar 9, 2022

I use Hugo and still get straight quotes.. Segoe UI is to blame.

@brycewray
Copy link
Author

I use Hugo and still get straight quotes.. Segoe UI is to blame.

That's odd. That font definitely has all the correct characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed pinned issue should not be closed by stalebot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants