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

How to apply microtypographic rules to Markdown? #59

Closed
DirtyF opened this issue Dec 8, 2019 · 9 comments
Closed

How to apply microtypographic rules to Markdown? #59

DirtyF opened this issue Dec 8, 2019 · 9 comments
Labels
feature request help wanted Extra attention is needed

Comments

@DirtyF
Copy link

DirtyF commented Dec 8, 2019

  1. What version of goldmark are you using? : v1.11.1 (Hugo 0.60.1)
  2. What version of Go are you using? : go1.13.4
  3. What operating system and processor architecture are you using? darwin/amd64 (macOS 10.15.1)
  4. What did you do? : Write Markdown in french language
  5. What did you expect to see? : french typographic rules applied (like inserting a non-breakable space before a question mark)
  6. What did you see instead? : no french typographic rules
  7. (Feature request only): Why you can not implement it as an extension?: Not a Go programmer

How should be french typographic rules applied, through an extension, or is it something that is dependendant of the Go language itself? Or another Go Package? SmartyPants but with more rules specific to a language.

For instance, languages like PHP have libs to handle this https://github.com/jolicode/JoliTypo

Some of the french typographic rules are liste by Grammalecte Firefox extension:

@yuin
Copy link
Owner

yuin commented Dec 9, 2019

This can be implemented as a goldmark extension. But I can not implement this because I don't know about French. (Can you imagine french people implement Japanese related functionalities?).

I keep this issue opened and wait to see someone creating this extension.

@yuin yuin added the help wanted Extra attention is needed label Dec 9, 2019
@inwardmovement
Copy link

inwardmovement commented Dec 11, 2019

@yuin can my issue here help you implement non-breaking spaces/french punctuation support?

I noticed also that ' is not always converted into a if there is no space after, which is common in french.

@DirtyF
Copy link
Author

DirtyF commented Dec 11, 2019

A similar attempt as a Hugo module: https://github.com/jygastaud/hugo-microtypo

@yuin
Copy link
Owner

yuin commented Dec 11, 2019

@inwardmovement @dertseha

Again, I'm not going to implement this. This is an open source project.
Regional functionalities should be implemented by people who belongs to the region.

@DirtyF
Copy link
Author

DirtyF commented Dec 11, 2019

🙏 @yuin thanks for pointing us in the right direction, closing this as wontfix.

@DirtyF DirtyF closed this as completed Dec 11, 2019
@kosssi
Copy link

kosssi commented Feb 26, 2020

I'm used a node script to implement this with https://github.com/sapegin/richtypo.js but I preferred have an extension by default in hugo like:

[markup]
  defaultMarkdownHandler = "goldmark"
  [markup.goldmark]
    [markup.goldmark.extensions]
      typographer = true
    [markup.goldmark.typographer]
      language = french

I'm not Go developer :'(
Maybe @DirtyF you could reopen this issue and a french dev see it :D

@DirtyF
Copy link
Author

DirtyF commented Feb 26, 2020

@kosssi I won't because I value Maintainers over Users in open source projects. If a french Go developer has the appetite to fix it, he will.

@cilex-ft
Copy link

cilex-ft commented Jan 9, 2022

I'm used a node script to implement this with https://github.com/sapegin/richtypo.js

@kosssi Please: how do you use this script? Can you show an example?

Thank you!

@yuin of course I'd love to write this extension ...if only I were a real programmer. Which extension could I use as an example? Is there a guide somewhere about howto write, compile, test... an extension? Thank you

@yuin
Copy link
Owner

yuin commented Jan 11, 2022

https://github.com/yuin/goldmark/blob/master/extension/typographer.go

Typographer extension can be used as an example. There are no guides yet, but many people created extensions referring to the builtin extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants