Restyle, fix old update bug

This commit is contained in:
Ilya Ig. Petrov 2017-10-31 17:18:53 +05:00
parent 98cbd5fd02
commit 56a0daf635
2 changed files with 7 additions and 2 deletions

View File

@ -158,7 +158,12 @@ export default function getProxyEditor(theState) {
return true;
};
const splitBySemi = (proxyString) => proxyString.replace(/#.*$/mg, '').trim().split(/\s*;\s*/g).filter((s) => s);
const splitBySemi = (proxyString) => proxyString
.replace(/#.*$/mg, '')
.trim()
.split(/\s*;\s*/g)
.filter((s) => s);
const joinBySemi = (strs) => strs.join(';\n') + ';';
const normalizeProxyString = (str) => joinBySemi(splitBySemi(str));