Avoid space removal when pasting text from word processor.
Since bf380eea50
, some spaces were removed when pasting text from a word processor (at least using Libre Office). To avoid double space creations and space removal, we only remove line break which are tight to a space character.
pull/2739/head
parent
5c531eebc5
commit
275a7d31e0
|
@ -100,7 +100,7 @@ function makeContentCollector(collectStyles, abrowser, apool, domInterface, clas
|
|||
function textify(str)
|
||||
{
|
||||
return sanitizeUnicode(
|
||||
str.replace(/\n/g, '').replace(/[\n\r ]/g, ' ').replace(/\xa0/g, ' ').replace(/\t/g, ' '));
|
||||
str.replace(/(\n | \n)/g, ' ').replace(/[\n\r ]/g, ' ').replace(/\xa0/g, ' ').replace(/\t/g, ' '));
|
||||
}
|
||||
|
||||
function getAssoc(node, name)
|
||||
|
|
Loading…
Reference in New Issue