-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handling of л and е, ё, ю, я after it
- Loading branch information
Showing
2 changed files
with
20 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ const processSpecialCase = (char, nextChar, prevChar, style, replacement) => { | |
index = 0; | ||
} | ||
} else if( 'lacinka' === style ) { | ||
if( ['е', 'ё', 'ю', 'я', 'ь'].includes(nextChar.toLowerCase()) ) { | ||
if( ['е', 'ё', 'і', 'л', 'ю', 'я', 'ь'].includes(nextChar.toLowerCase()) ) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
skip405
Author
Owner
|
||
index = 0; | ||
} else { | ||
index = 1; | ||
|
@@ -32,6 +32,8 @@ const processSpecialCase = (char, nextChar, prevChar, style, replacement) => { | |
case 'я' : | ||
if( ['а', 'і', 'о', 'у', 'ы', 'ў', 'э', 'ь', '’', '‘'].includes(prevChar.toLowerCase()) || '' === prevChar ) { | ||
index = 1; | ||
} else if( ['л'].includes(prevChar.toLowerCase()) && 'lacinka' === style ) { | ||
index = 2; | ||
} | ||
|
||
break; | ||
|
@@ -112,8 +114,8 @@ export default function belLat(string, options) { | |
['г', ['h', 'g']], | ||
['ґ', ['g']], | ||
['д', ['d']], | ||
['е', ['ie', 'je']], | ||
['ё', ['io', 'jo']], | ||
['е', ['ie', 'je', 'e']], | ||
['ё', ['io', 'jo', 'o']], | ||
['ж', ['z', 'ž', 'zh']], | ||
['з', ['z', 'ź']], | ||
['і', ['i']], | ||
|
@@ -137,8 +139,8 @@ export default function belLat(string, options) { | |
['ь', '_omitted'], | ||
['ы', ['y']], | ||
['э', ['e']], | ||
['ю', ['iu', 'ju']], | ||
['я', ['ia', 'ja']], | ||
['ю', ['iu', 'ju', 'u']], | ||
['я', ['ia', 'ja', 'a']], | ||
['’', '_omitted'], | ||
['‘', '_omitted'], | ||
...options.customReplacements | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
А тут мусіць быць "л" таксама ў спісе?