Typeset icon indicating copy to clipboard operation
Typeset copied to clipboard

language switch changes rules?

Open alexisargyris opened this issue 9 years ago • 3 comments

Found three small issues, all related to different behaviour when processing greek characters, instead of latin.

Problem 1: single quote before space

correctwrong
inputenglish' englishελληνικά' ελληνικά
outputenglish’ englishελληνικά′ ελληνικά

Problem 2: double quotes before full stop

correctwrong
input"english"."ελληνικά".
output“english”.“ελληνικά“.

Problem 3: double quotes before comma

correctwrong
input"english","ελληνικά",
output“english”,“ελληνικά“,

alexisargyris avatar Sep 04 '15 19:09 alexisargyris

Ah I think I know what's going on. I believe the regular expression handling the quote replacement doesn't consider 'ά' to be a letter. This is something which can be fixed without needing to specify a language.

I believe [a-z] in quotes.js needs to be modified to match accented characters too.

davidmerfield avatar Sep 04 '15 20:09 davidmerfield

I tried with no accent and I still get open double quotes

alexisargyris avatar Sep 04 '15 20:09 alexisargyris

For your reference here is what I use as test input. The format is "greek // english"

ένα' δύο // one' two

ένα'δύο // one'two

ένα 'δύο // one 'two

"καλα" // "one"

"καλα". // "one".

"καλα", // "one",

"καλά" // "one"

"καλά". // "one".

"καλά", // "one",

ένα–και–ένα // one–on–one

ένα – και – ένα // one – on – one

ένα--και--ένα // one--on--one

ένα -- και -- ένα // one -- on -- one

καλά... // good...

alexisargyris avatar Sep 04 '15 20:09 alexisargyris