greeklish_iso843 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/greeklish_iso843/greek_text.rb +7 -1
- data/lib/greeklish_iso843/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8fdabbc41fcf736259cc0635a62ce9e37ea40b0ddca6279da804de77297ff9b
|
4
|
+
data.tar.gz: dd0dc66e47ebacb5e6db56367887b6bc27c37f1a414907a26db1e24e13b6238c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d46ed5272f19fe1aae1579e9eb8bc2740c99cb96201f42148d5caccc95f1a72300f7bf4778251e7744f9803230756c09451596ee828fe3d3fde2690d1749e74a
|
7
|
+
data.tar.gz: 7e30e6a280adc1aadc25c30b2afdbf0277fd93f2f156b628faf08f7f934d816a853de8bc140b74717addbb6650fac457dcce9d7421def07ab6c8f6b0c90a5d84
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,12 @@ The format is based on [Keep a Changelog][] and this project adheres to
|
|
7
7
|
|
8
8
|
## [Unreleased][]
|
9
9
|
|
10
|
+
## [0.4.1][] - 2021-04-29
|
11
|
+
|
12
|
+
- Do not raise `UnhandledCaseError` if next character is whitespace when
|
13
|
+
converting v or f. For example, `άνευ` would correctly transliterate to `anef`
|
14
|
+
but `άνευ λόγου` would raise due to the whitespace after `ευ`.
|
15
|
+
|
10
16
|
## [0.4.0][] - 2021-04-28
|
11
17
|
|
12
18
|
### Changed
|
@@ -11,6 +11,8 @@ class GreeklishIso843::GreekText
|
|
11
11
|
|
12
12
|
GREEK_LETTERS_AFTER_F = 'θκξπστφχψ'.freeze
|
13
13
|
|
14
|
+
BLANK_REGEXP = /\A[[:space:]]*\z/.freeze
|
15
|
+
|
14
16
|
REPLACEMENTS = {
|
15
17
|
'αι' => 'ai',
|
16
18
|
'αί' => 'ai',
|
@@ -154,8 +156,12 @@ class GreeklishIso843::GreekText
|
|
154
156
|
end
|
155
157
|
|
156
158
|
private def convert_v_or_f(next_char)
|
157
|
-
return 'f' if next_char
|
159
|
+
return 'f' if blank?(next_char) || GREEK_LETTERS_AFTER_F[next_char]
|
158
160
|
|
159
161
|
'v' if GREEK_LETTERS_AFTER_V[next_char]
|
160
162
|
end
|
163
|
+
|
164
|
+
private def blank?(str)
|
165
|
+
str.nil? || str =~ BLANK_REGEXP
|
166
|
+
end
|
161
167
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: greeklish_iso843
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Angelos Orfanakos
|
@@ -44,8 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
46
|
requirements: []
|
47
|
-
|
48
|
-
rubygems_version: 2.7.6.2
|
47
|
+
rubygems_version: 3.1.4
|
49
48
|
signing_key:
|
50
49
|
specification_version: 4
|
51
50
|
summary: Convert Greek text to Greeklish conforming to ISO 843 (ELOT 743)
|