latex-decode 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile +1 -1
- data/latex-decode.gemspec +2 -3
- data/lib/latex/decode/compatibility.rb +18 -10
- data/lib/latex/decode/version.rb +1 -1
- metadata +5 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f075a3a6e28fdeb92c9dba6486f56c461936a5a9
|
4
|
+
data.tar.gz: 27de3bebcc186f328d8bb6122357933a51baef51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6810f6ecdddf8d2b27e0bc8b9b80ef1277b3ac1270fa0901f1936edb057a0e19471c8a61768623df8e33661106103a1bebb00963425f324f68fde763a3aada53
|
7
|
+
data.tar.gz: 93f809598a9dbb63331c52c6e0b76a866a68103cdca6783ec468eced7b23e937907eae56fcd3f54230fc8b17f45d9047671a0fffe273555896b53efa8f62b7fb
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -15,7 +15,7 @@ group :debug do
|
|
15
15
|
gem 'rubinius-compiler', :require => false, :platforms => :rbx
|
16
16
|
end
|
17
17
|
|
18
|
-
gem 'unicode', '~> 0.4', :platforms => [:mri, :rbx, :mswin, :mingw]
|
18
|
+
gem 'unicode', '~> 0.4', :platforms => [:mri, :rbx, :mswin, :mingw] if RUBY_VERSION < '2.4'
|
19
19
|
gem 'ritex', '~> 1.0.1'
|
20
20
|
|
21
21
|
gem 'rubysl', '~> 2.0', :platforms => :rbx
|
data/latex-decode.gemspec
CHANGED
@@ -12,12 +12,11 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.homepage = 'http://github.com/inukshuk/latex-decode'
|
13
13
|
s.summary = 'Decodes LaTeX to Unicode.'
|
14
14
|
s.description = 'Decodes strings formatted in LaTeX to equivalent Unicode strings.'
|
15
|
-
s.license = 'GPL-3'
|
15
|
+
s.license = 'GPL-3.0'
|
16
16
|
|
17
17
|
if RUBY_PLATFORM =~ /java/
|
18
18
|
s.platform = 'java'
|
19
19
|
else
|
20
|
-
s.add_dependency('unicode', '~> 0.4')
|
21
20
|
s.platform = 'ruby'
|
22
21
|
end
|
23
22
|
|
@@ -30,4 +29,4 @@ Gem::Specification.new do |s|
|
|
30
29
|
s.extra_rdoc_files = %w{README.md LICENSE}
|
31
30
|
end
|
32
31
|
|
33
|
-
# vim: syntax=ruby
|
32
|
+
# vim: syntax=ruby
|
@@ -33,27 +33,35 @@ if RUBY_PLATFORM == 'java'
|
|
33
33
|
end
|
34
34
|
|
35
35
|
else
|
36
|
-
|
37
|
-
require 'unicode'
|
38
|
-
|
39
|
-
# Use the Unicode gem
|
36
|
+
if RUBY_VERSION >= '2.4'
|
40
37
|
module LaTeX
|
41
38
|
def self.normalize_C(string)
|
42
|
-
|
39
|
+
string.unicode_normalize(:nfc)
|
43
40
|
end
|
44
41
|
end
|
45
|
-
|
42
|
+
else
|
46
43
|
begin
|
47
|
-
require '
|
44
|
+
require 'unicode'
|
48
45
|
|
49
|
-
# Use
|
46
|
+
# Use the Unicode gem
|
50
47
|
module LaTeX
|
51
48
|
def self.normalize_C(string)
|
52
|
-
|
49
|
+
Unicode::normalize_C(string)
|
53
50
|
end
|
54
51
|
end
|
55
52
|
rescue LoadError
|
56
|
-
|
53
|
+
begin
|
54
|
+
require 'active_support/multibyte/chars'
|
55
|
+
|
56
|
+
# Use ActiveSupport's normalizer
|
57
|
+
module LaTeX
|
58
|
+
def self.normalize_C(string)
|
59
|
+
ActiveSupport::Multibyte::Chars.new(string).normalize(:c).to_s
|
60
|
+
end
|
61
|
+
end
|
62
|
+
rescue LoadError
|
63
|
+
fail "Failed to load unicode normalizer: please gem install unicode (or active_support)"
|
64
|
+
end
|
57
65
|
end
|
58
66
|
end
|
59
67
|
end
|
data/lib/latex/decode/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: latex-decode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: unicode
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.4'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0.4'
|
11
|
+
date: 2017-11-03 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
27
13
|
description: Decodes strings formatted in LaTeX to equivalent Unicode strings.
|
28
14
|
email:
|
29
15
|
- http://sylvester.keil.or.at
|
@@ -64,7 +50,7 @@ files:
|
|
64
50
|
- lib/latex/decode/version.rb
|
65
51
|
homepage: http://github.com/inukshuk/latex-decode
|
66
52
|
licenses:
|
67
|
-
- GPL-3
|
53
|
+
- GPL-3.0
|
68
54
|
metadata: {}
|
69
55
|
post_install_message:
|
70
56
|
rdoc_options:
|
@@ -89,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
75
|
version: '0'
|
90
76
|
requirements: []
|
91
77
|
rubyforge_project:
|
92
|
-
rubygems_version: 2.
|
78
|
+
rubygems_version: 2.6.12
|
93
79
|
signing_key:
|
94
80
|
specification_version: 4
|
95
81
|
summary: Decodes LaTeX to Unicode.
|
@@ -105,4 +91,3 @@ test_files:
|
|
105
91
|
- features/support/env.rb
|
106
92
|
- features/symbols.feature
|
107
93
|
- features/umlauts.feature
|
108
|
-
has_rdoc:
|