hebrew-transliteration 2.0.4 → 2.0.5

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.esm.js CHANGED
@@ -368,8 +368,10 @@ var getSylOpts = (schema) => {
368
368
  var transliterate = (text, schema) => {
369
369
  const transSchema = schema instanceof Schema ? schema : new SBL(schema != null ? schema : {});
370
370
  const isText = text instanceof Text2;
371
- if (!isText && !vowels.test(text))
372
- return mapChars(text, transSchema);
371
+ if (!isText && !vowels.test(text)) {
372
+ const sin = new RegExp(transSchema.SHIN + "\u05C2", "gu");
373
+ return mapChars(text, transSchema).replace(sin, transSchema.SIN).replace(/\u{05C1}/gu, "");
374
+ }
373
375
  const sylOptions = getSylOpts(transSchema != null ? transSchema : {});
374
376
  const newText = isText ? text : new Text2(text, sylOptions);
375
377
  return newText.words.map((word) => {
package/dist/index.js CHANGED
@@ -395,8 +395,10 @@ var getSylOpts = (schema) => {
395
395
  var transliterate = (text, schema) => {
396
396
  const transSchema = schema instanceof Schema ? schema : new SBL(schema != null ? schema : {});
397
397
  const isText = text instanceof import_havarotjs2.Text;
398
- if (!isText && !vowels.test(text))
399
- return mapChars(text, transSchema);
398
+ if (!isText && !vowels.test(text)) {
399
+ const sin = new RegExp(transSchema.SHIN + "\u05C2", "gu");
400
+ return mapChars(text, transSchema).replace(sin, transSchema.SIN).replace(/\u{05C1}/gu, "");
401
+ }
400
402
  const sylOptions = getSylOpts(transSchema != null ? transSchema : {});
401
403
  const newText = isText ? text : new import_havarotjs2.Text(text, sylOptions);
402
404
  return newText.words.map((word) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hebrew-transliteration",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "a package for transliterating Hebrew",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",