taraskevizer 5.3.0 → 5.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -51,6 +51,7 @@ var iwords = toOneLine(`біс
51
51
  л(іст| )
52
52
  лістас
53
53
  льк
54
+ м
54
55
  мант
55
56
  мась?ц
56
57
  мбры[кч]
@@ -67,7 +68,7 @@ var iwords = toOneLine(`біс
67
68
  нфікс
68
69
  нфімум
69
70
  ншась?ц
70
- нш(а[ейя]?|ась?ц|ую|ы(мі|х|я)?)
71
+ нш(а[ейя]?|ась?ц|ую|ы(мі?|х|я)?)
71
72
  псілан
72
73
  р([аыу]|а[мхйў]|амі|)
73
74
  рад
@@ -216,14 +217,14 @@ var rawLatinLettersJi = [
216
217
  [`І(?=${iwords})`, "Ji"],
217
218
  [`І(?=${iwords.toUpperCase()})`, "JI"],
218
219
  ...common.lower[0],
219
- [/(?<=[eouaаеёіоуўыэюяьʼАЕЁІОУЎЫЭЮЯЬ] *)і/, "ji"],
220
+ [/(?<=[eouaаеёіоуўыэюяʼАЕЁІОУЎЫЭЮЯЬ] *)і/, "ji"],
220
221
  ...common.lower[1]
221
222
  ];
222
223
  var rawLatinLettersUpperCaseJi = [
223
224
  ...common.upper[0],
224
225
  [new RegExp("(?<=[eoua] *)І(?=[ \\p{P}\\d]*\\p{Lu}?\\p{Ll})", "u"), "Ji"],
225
226
  ...common.upper[1],
226
- [/(?<=[AOEUАЕЁІОУЎЫЭЮЯЬ][( ]*)І/, "JI"],
227
+ [/(?<=[AOEUАЕЁІОУЎЫЭЮЯ][( ]*)І/, "JI"],
227
228
  ...common.upper[2]
228
229
  ];
229
230
 
@@ -2063,7 +2064,8 @@ var afterTarask = [
2063
2064
  ]
2064
2065
  ];
2065
2066
  var applyNoFix = (arr2, text) => arr2.length ? text.replace(NOFIX_REGEX, () => arr2.shift()) : text;
2066
- var join = (textArr) => textArr.join(" ").replace(/&nbsp;/g, " ").replace(new RegExp(" (\\p{P}|\\p{S}|\\d|&#40) ", "gu"), "$1");
2067
+ var afterJoin = (text) => text.replace(/&nbsp;/g, " ").replace(new RegExp(" (\\p{P}|\\p{S}|\\d|&#40) ", "gu"), "$1");
2068
+ var join = (textArr) => afterJoin(textArr.join(" "));
2067
2069
  var finalize = (text, newLine) => text.replace(/ \t /g, " ").replace(/ \n /g, newLine).trim();
2068
2070
  var replaceG = (text, replacer) => text.replace(
2069
2071
  G_REGEX,
@@ -2160,7 +2162,11 @@ var Taraskevizer = class {
2160
2162
  const origInTargetAlphabet = convertAlphabet(text, this.abc);
2161
2163
  text = this.process(text, origInTargetAlphabet);
2162
2164
  if (this.nonHtml.ansiColors)
2163
- text = highlightChanges(text, origInTargetAlphabet, wrapInColorOf.fix);
2165
+ text = highlightChanges(
2166
+ text,
2167
+ afterJoin(origInTargetAlphabet),
2168
+ wrapInColorOf.fix
2169
+ );
2164
2170
  if (this.abc === ALPHABET.CYRILLIC && (this.nonHtml.h || this.nonHtml.ansiColors))
2165
2171
  text = replaceG(
2166
2172
  text,
@@ -2183,7 +2189,7 @@ var Taraskevizer = class {
2183
2189
  const origInTargetAlphabet = convertAlphabet(text, this.abc);
2184
2190
  text = highlightChanges(
2185
2191
  this.process(text, origInTargetAlphabet),
2186
- origInTargetAlphabet,
2192
+ afterJoin(origInTargetAlphabet),
2187
2193
  wrapInTag.fix
2188
2194
  );
2189
2195
  if (this.abc === ALPHABET.CYRILLIC)
package/dist/index.js CHANGED
@@ -20,6 +20,7 @@ var iwords = toOneLine(`біс
20
20
  л(іст| )
21
21
  лістас
22
22
  льк
23
+ м
23
24
  мант
24
25
  мась?ц
25
26
  мбры[кч]
@@ -36,7 +37,7 @@ var iwords = toOneLine(`біс
36
37
  нфікс
37
38
  нфімум
38
39
  ншась?ц
39
- нш(а[ейя]?|ась?ц|ую|ы(мі|х|я)?)
40
+ нш(а[ейя]?|ась?ц|ую|ы(мі?|х|я)?)
40
41
  псілан
41
42
  р([аыу]|а[мхйў]|амі|)
42
43
  рад
@@ -185,14 +186,14 @@ var rawLatinLettersJi = [
185
186
  [`І(?=${iwords})`, "Ji"],
186
187
  [`І(?=${iwords.toUpperCase()})`, "JI"],
187
188
  ...common.lower[0],
188
- [/(?<=[eouaаеёіоуўыэюяьʼАЕЁІОУЎЫЭЮЯЬ] *)і/, "ji"],
189
+ [/(?<=[eouaаеёіоуўыэюяʼАЕЁІОУЎЫЭЮЯЬ] *)і/, "ji"],
189
190
  ...common.lower[1]
190
191
  ];
191
192
  var rawLatinLettersUpperCaseJi = [
192
193
  ...common.upper[0],
193
194
  [new RegExp("(?<=[eoua] *)І(?=[ \\p{P}\\d]*\\p{Lu}?\\p{Ll})", "u"), "Ji"],
194
195
  ...common.upper[1],
195
- [/(?<=[AOEUАЕЁІОУЎЫЭЮЯЬ][( ]*)І/, "JI"],
196
+ [/(?<=[AOEUАЕЁІОУЎЫЭЮЯ][( ]*)І/, "JI"],
196
197
  ...common.upper[2]
197
198
  ];
198
199
 
@@ -2032,7 +2033,8 @@ var afterTarask = [
2032
2033
  ]
2033
2034
  ];
2034
2035
  var applyNoFix = (arr2, text) => arr2.length ? text.replace(NOFIX_REGEX, () => arr2.shift()) : text;
2035
- var join = (textArr) => textArr.join(" ").replace(/&nbsp;/g, " ").replace(new RegExp(" (\\p{P}|\\p{S}|\\d|&#40) ", "gu"), "$1");
2036
+ var afterJoin = (text) => text.replace(/&nbsp;/g, " ").replace(new RegExp(" (\\p{P}|\\p{S}|\\d|&#40) ", "gu"), "$1");
2037
+ var join = (textArr) => afterJoin(textArr.join(" "));
2036
2038
  var finalize = (text, newLine) => text.replace(/ \t /g, " ").replace(/ \n /g, newLine).trim();
2037
2039
  var replaceG = (text, replacer) => text.replace(
2038
2040
  G_REGEX,
@@ -2129,7 +2131,11 @@ var Taraskevizer = class {
2129
2131
  const origInTargetAlphabet = convertAlphabet(text, this.abc);
2130
2132
  text = this.process(text, origInTargetAlphabet);
2131
2133
  if (this.nonHtml.ansiColors)
2132
- text = highlightChanges(text, origInTargetAlphabet, wrapInColorOf.fix);
2134
+ text = highlightChanges(
2135
+ text,
2136
+ afterJoin(origInTargetAlphabet),
2137
+ wrapInColorOf.fix
2138
+ );
2133
2139
  if (this.abc === ALPHABET.CYRILLIC && (this.nonHtml.h || this.nonHtml.ansiColors))
2134
2140
  text = replaceG(
2135
2141
  text,
@@ -2152,7 +2158,7 @@ var Taraskevizer = class {
2152
2158
  const origInTargetAlphabet = convertAlphabet(text, this.abc);
2153
2159
  text = highlightChanges(
2154
2160
  this.process(text, origInTargetAlphabet),
2155
- origInTargetAlphabet,
2161
+ afterJoin(origInTargetAlphabet),
2156
2162
  wrapInTag.fix
2157
2163
  );
2158
2164
  if (this.abc === ALPHABET.CYRILLIC)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taraskevizer",
3
- "version": "5.3.0",
3
+ "version": "5.3.2",
4
4
  "author": "GooseOb",
5
5
  "repository": {
6
6
  "type": "git",