mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 14:47:12 -04:00
refactor Pad.js; remove joose dependency
This commit is contained in:
parent
8ac872bea8
commit
f05fc7ba31
5 changed files with 431 additions and 466 deletions
7
node/utils/cleantext.js
Normal file
7
node/utils/cleantext.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* Copied from the Etherpad source code. It converts Windows line breaks to Unix line breaks and convert Tabs to spaces
|
||||
* @param txt
|
||||
*/
|
||||
exports.cleanText = function (txt) {
|
||||
return txt.replace(/\r\n/g,'\n').replace(/\r/g,'\n').replace(/\t/g, ' ').replace(/\xa0/g, ' ');
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue