jkf 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jkf/parser/kif.rb +11 -2
- data/lib/jkf/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62e414ef9443049f0ab631af44d70072f7c7e55e
|
4
|
+
data.tar.gz: 2ead76a04ded9f63ed4b0ddf13dfa107d65f2072
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c5e351ed8a6479d9e2b620cba5cdf96da8f82adf818c1243c6a7150cc5178dad6853e108ed97379f351215e758a159f8f860e15b134df80d74494f700177367
|
7
|
+
data.tar.gz: 98ce473672fd1a672b7a1fc35f627508920632ddf7d706f398e8a4f7a03123b731c1e0baf2c6d6fe2f36408ae9b75a30d56d3ed64a4fceb5faa12474101e7832
|
data/lib/jkf/parser/kif.rb
CHANGED
@@ -883,6 +883,7 @@ module Jkf::Parser
|
|
883
883
|
s4 = match_str("/")
|
884
884
|
if s4 != :failed
|
885
885
|
s5 = parse_hms
|
886
|
+
s5 = parse_ms(with_hour: true) if s5 == :failed
|
886
887
|
if s5 != :failed
|
887
888
|
s6 = match_str(")")
|
888
889
|
if s6 != :failed
|
@@ -980,7 +981,7 @@ module Jkf::Parser
|
|
980
981
|
s0
|
981
982
|
end
|
982
983
|
|
983
|
-
def parse_ms
|
984
|
+
def parse_ms(with_hour: false)
|
984
985
|
s0 = @current_pos
|
985
986
|
s1 = []
|
986
987
|
s2 = match_regexp(/^[0-9]/)
|
@@ -1007,7 +1008,15 @@ module Jkf::Parser
|
|
1007
1008
|
end
|
1008
1009
|
if s3 != :failed
|
1009
1010
|
@reported_pos = s0
|
1010
|
-
|
1011
|
+
m = s1.join.to_i
|
1012
|
+
s = s3.join.to_i
|
1013
|
+
if with_hour
|
1014
|
+
h = m / 60
|
1015
|
+
m = m % 60
|
1016
|
+
s0 = s1 = { "h" => h, "m" => m, "s" => s }
|
1017
|
+
else
|
1018
|
+
s0 = s1 = { "m" => m, "s" => s }
|
1019
|
+
end
|
1011
1020
|
else
|
1012
1021
|
@current_pos = s0
|
1013
1022
|
s0 = :failed
|
data/lib/jkf/version.rb
CHANGED