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

Add multi-language support for Goldmark Typographer #9727

Closed
psvo opened this issue Mar 27, 2022 · 3 comments
Closed

Add multi-language support for Goldmark Typographer #9727

psvo opened this issue Mar 27, 2022 · 3 comments
Assignees
Milestone

Comments

@psvo
Copy link

psvo commented Mar 27, 2022

Goldmark Typographer extension used by Hugo currently applies only English typographic rules.

The Typographer extension already supports configuring substitution, but Hugo uses the default config and it does not expose the options to the user (extensions.NewTypographer(opts ...TypographerOption)).

There's an existing Goldmark extension that can already configure the Typographer for different languages https://github.com/mdigger/goldmark-lang-typographer, but not using it and just allowing manual configuration for Typographer extension would be totally sufficient and probably more flexible.

As proof of concept, I implemented it with static global configuration. But, being able to configure different option for different languages and making it sensitive to page language would be much more interesting. Unfortunately, I have not figured out how to implement this yet.

Would be there any interest in including such feature in Hugo?

@bep bep added this to the v0.99.0 milestone Apr 28, 2022
@bep bep modified the milestones: v0.99.0, v0.100.0 May 24, 2022
@bep bep modified the milestones: v0.100.0, v0.101.0 May 31, 2022
@bep bep modified the milestones: v0.101.0, v0.102.0 Jun 16, 2022
@bep bep modified the milestones: v0.102.0, v0.103.0 Aug 28, 2022
@bep bep modified the milestones: v0.103.0, v0.104.0 Sep 15, 2022
@bep bep modified the milestones: v0.104.0, v0.105.0 Sep 23, 2022
@bep bep modified the milestones: v0.105.0, v0.106.0 Oct 26, 2022
@bep bep modified the milestones: v0.106.0, v0.107.0 Nov 18, 2022
@bep bep modified the milestones: v0.107.0, v0.108.0 Dec 3, 2022
@bep bep modified the milestones: v0.108.0, v0.109.0 Dec 14, 2022
@micw
Copy link

micw commented Jan 4, 2023

I would love this feature in hugo. I spend a lot of time in fine-tweaking the language settings but this little piece is still missing.

Since the underlying lib already supports this, it should only be a matter of adding a config flag, as suggested in yuin/goldmark#59 (comment) .

@bep bep modified the milestones: v0.109.0, v0.111.0, v0.110.0 Jan 26, 2023
@jmooring
Copy link
Member

Implemented in #10892, #10602, and #10970.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants