jygastaud / hugo-microtypo

That project is a try to build a Hugo module by porting [Jekyll Microtypo](https://github.com/borisschapira/jekyll-microtypo)
8 stars 4 forks source link

Fix French Guillemets #1

Open jygastaud opened 4 years ago

jygastaud commented 4 years ago

https://github.com/jygastaud/hugo-microtypo/blob/master/microtypo/layouts/partials/content.html#L14

bugsysop commented 3 years ago

Pour le traitement des guillemets français (c’est quand même un peu incontournable) j’ai ajouté personnellement un rechercher/remplacer peu élégant, mais qui fait le job en attendant mieux:

{{- $content = $content | replaceRE "(«)( )" "$1 " -}}
{{- $content = $content | replaceRE "( )(»)" " $2" -}}

Si cela peu servir à quelqu’un...

jygastaud commented 3 years ago

Hi @bugsysop @DirtyF ,

I just commit some rules for French Guillemets. Can you try it on your own project and check of there is any issues ?

DirtyF commented 3 years ago

@jygastaud LGTM "rééllement" becomes « réellement » Let me know if you need more testing.

bugsysop commented 3 years ago

Substitution of straight quotes to french "guillemets" work fine... But the "english" curly quote are also transformed to french "guillemets". That's in fact a problem, for exemple in case of nested quotes.

jygastaud commented 3 years ago

@bugsysop can you give me an example of a sentance that has bad transformation and the expected result?