Skip to content

Commit

Permalink
fix: вы с неразрвыным пробелом
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Apr 30, 2020
1 parent 8183ae5 commit 1b11fb7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tmpls.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,13 @@ const pffTmpls = {
},

replaceVy(html, isNew) {
const matched = html.match(/(\s|^)(вы|вас|вам|ваш(и|а|ему|его|ей)?)([\s,.!:)?]|$)/ig);
//win.PFF.debug(matched);
const matched = html.match(/([\s;]|^)(вы|вас|вам|ваш(и|а|ему|его|ей)?)([\s,.!&:)?]|$)/ig);
// win.PFF.debug(matched);
for(let m of matched) {
const newL = isNew ? 'в' : 'В';
const rep = m.replace(/в/i, newL)
const rep = m.replace(/в/i, newL);
const reg = new RegExp(rep, 'gi');
//win.PFF.debug(`${m} -> ${rep}`);
// win.PFF.debug(`${m} -> ${rep}`);
html = html.replace(reg, rep);
}
return html;
Expand Down

0 comments on commit 1b11fb7

Please sign in to comment.