diff --git a/index.js b/index.js index 491f76e..2141400 100644 --- a/index.js +++ b/index.js @@ -197,7 +197,8 @@ module.exports = function(babel) let ru = getRegexp(state); if (ru.exec(path.node.value)) { - const [ lwhite, text, rwhite ] = splitWhite(path.node.value); + let [ lwhite, text, rwhite ] = splitWhite(path.node.value); + text = text.replace(/\s{2,}|[\n\r\t]/g, ' '); addImport(path); addString(path, text); const repl = []; diff --git a/package.json b/package.json index ae837b3..50218ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-react-translate", - "version": "1.0.3", + "version": "1.0.4", "description": "Babel-based JS/JSX auto-translator for Russian language", "main": "index.js", "scripts": {