ufal / charles-translator-web-frontend

Charles Translator: MT from Charles University
6 stars 7 forks source link

handling of whitespace #18

Closed jindrahelcl closed 2 years ago

jindrahelcl commented 2 years ago

trailing whitespace (e.g. empty lines after the text) is copied to the target field and it breaks the alignment of the componenta in the layout.

i guess we could safely remove all trailing (and also leading) whitespace and maybe replace all whitespace sequences containing a newline with a single newline.

EbrithilNogare commented 2 years ago

done

martinpopel commented 2 years ago

@EbrithilNogare Can you please always link the commit or PR which closes a given issue? An easy way how to do it is to write "fixes #xy" in the commit message, which automatically closes issue #xy.

EbrithilNogare commented 2 years ago

This issue is not relevant as we are not swaping text from translation to source (we keep source). But if you want it, this commit is fixing same problem but for copy button.