taraskevizer 1.4.1 → 1.4.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
@@ -2085,6 +2085,11 @@ for (const word of gwords)
2085
2085
 
2086
2086
  // src/tarask.ts
2087
2087
  var isUpperCase = (str) => str === str.toUpperCase();
2088
+ var getLastLetter = (word) => {
2089
+ for (let i = word.length - 1; i > 0; i--)
2090
+ if (/\p{L}/u.test(word[i]))
2091
+ return word[i];
2092
+ };
2088
2093
  var NOFIX_CHAR = " ￿ ";
2089
2094
  var NOFIX_REGEX = new RegExp(NOFIX_CHAR, "g");
2090
2095
  var OPTIONAL_WORDS_REGEX = /\(.*?\)/g;
@@ -2132,7 +2137,7 @@ var taraskSync = (text, options) => {
2132
2137
  const apply = html ? tagApplications.html : tagApplications.nonHtml;
2133
2138
  const noFix = [];
2134
2139
  const LEFT_ANGLE_BRACKET = html ? "&lt;" : "<";
2135
- text = ` ${text.trim()} `.replace(/<([,.]?)((?:.|\s)*?)>/g, ($0, $1, $2) => {
2140
+ text = ` ${text.trim()} `.replace(/�/g, "").replace(/<([,.]?)((?:.|\s)*?)>/g, ($0, $1, $2) => {
2136
2141
  if ($1 === ",")
2137
2142
  return LEFT_ANGLE_BRACKET + $2 + ">";
2138
2143
  noFix[noFix.length] = $1 === "." ? $2 : $0;
@@ -2201,11 +2206,6 @@ function restoreCase(text, orig) {
2201
2206
  }
2202
2207
  return text;
2203
2208
  }
2204
- var getLastLetter = (word) => {
2205
- for (let i = word.length - 1; i > 1; i--)
2206
- if (/\p{L}/u.test(word[i]))
2207
- return word[i];
2208
- };
2209
2209
  function toTags(text, orig, abc, applyF) {
2210
2210
  for (let i = 0; i < text.length; i++) {
2211
2211
  const word = text[i];
package/dist/index.js CHANGED
@@ -2055,6 +2055,11 @@ for (const word of gwords)
2055
2055
 
2056
2056
  // src/tarask.ts
2057
2057
  var isUpperCase = (str) => str === str.toUpperCase();
2058
+ var getLastLetter = (word) => {
2059
+ for (let i = word.length - 1; i > 0; i--)
2060
+ if (/\p{L}/u.test(word[i]))
2061
+ return word[i];
2062
+ };
2058
2063
  var NOFIX_CHAR = " ￿ ";
2059
2064
  var NOFIX_REGEX = new RegExp(NOFIX_CHAR, "g");
2060
2065
  var OPTIONAL_WORDS_REGEX = /\(.*?\)/g;
@@ -2102,7 +2107,7 @@ var taraskSync = (text, options) => {
2102
2107
  const apply = html ? tagApplications.html : tagApplications.nonHtml;
2103
2108
  const noFix = [];
2104
2109
  const LEFT_ANGLE_BRACKET = html ? "&lt;" : "<";
2105
- text = ` ${text.trim()} `.replace(/<([,.]?)((?:.|\s)*?)>/g, ($0, $1, $2) => {
2110
+ text = ` ${text.trim()} `.replace(/�/g, "").replace(/<([,.]?)((?:.|\s)*?)>/g, ($0, $1, $2) => {
2106
2111
  if ($1 === ",")
2107
2112
  return LEFT_ANGLE_BRACKET + $2 + ">";
2108
2113
  noFix[noFix.length] = $1 === "." ? $2 : $0;
@@ -2171,11 +2176,6 @@ function restoreCase(text, orig) {
2171
2176
  }
2172
2177
  return text;
2173
2178
  }
2174
- var getLastLetter = (word) => {
2175
- for (let i = word.length - 1; i > 1; i--)
2176
- if (/\p{L}/u.test(word[i]))
2177
- return word[i];
2178
- };
2179
2179
  function toTags(text, orig, abc, applyF) {
2180
2180
  for (let i = 0; i < text.length; i++) {
2181
2181
  const word = text[i];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "taraskevizer",
3
3
  "author": "GooseOb",
4
4
  "license": "MIT",
5
- "version": "1.4.1",
5
+ "version": "1.4.2",
6
6
  "private": false,
7
7
  "homepage": "https://gooseob.github.io/taraskevizatar/",
8
8
  "main": "dist/index.js",