zestedesavoir / zmarkdown

Live demo: https://zestedesavoir.github.io/zmarkdown/
MIT License
224 stars 52 forks source link

[remark-typo]: french quotes not inserted on some WTF cases #469

Closed artragis closed 1 year ago

artragis commented 2 years ago

Here is the sentence :

Les propriétaires de l'application créent un <<contenu>>, lui donne des <<méta données>> et les visiteurs vont pouvoir accéder à la fiche ainsi rédigée de ces contenus.

Here is the result :

Un CMS distingue deux types d’utilisateurs : les propriétaires et les visiteurs. Le concept est le suivant : Les propriétaires de l’application créent un <<contenu>>, lui donne des «méta données» et les visiteurs vont pouvoir accéder à la fiche ainsi rédigée de ces contenus.

the "contenu" part is not properly translated. It is translated if we put a blanck space between << and c.

It is expected not to have to put this extra space.

artragis commented 2 years ago

Another one is when the << >> elements are inside a list element.

AmauryCarrade commented 2 years ago

Also for the <<méta données>> part (i.e. when characters are correctly replaced), inner non-breaking spaces (U+00A0) are not inserted; I think they should be, so to respect French typography.

StaloneLab commented 1 year ago

I recently investigated this problem, which was more complicated than I expected, and am left with the following:

artragis commented 1 year ago

good to me. The issue was coming from inconsistancy, so it would solve it.

StaloneLab commented 1 year ago

Okay, finally we should be able to solve it correctly. I found one of our plugins, remark-fix-guillemets, which already does what we want. It was certainly forgotten during one of the refactorings. I included it in my PR for ZMarkdown 11.2. The problem reported by @AmauryCarrade about adding NBSP was also solved by a simple fix to the plugin.