citeproc 1.0.0.pre9 → 1.0.0.pre10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/citeproc/variable.rb +11 -0
- data/lib/citeproc/version.rb +1 -1
- metadata +3 -3
data/lib/citeproc/variable.rb
CHANGED
@@ -182,6 +182,17 @@ module CiteProc
|
|
182
182
|
Number.romanize(to_i)
|
183
183
|
end
|
184
184
|
|
185
|
+
# @return [Array<String>] tokenizes the variable's value
|
186
|
+
def tokenize
|
187
|
+
numbers = to_s.dup
|
188
|
+
|
189
|
+
numbers.gsub!(/\s*,\s*/, ', ')
|
190
|
+
numbers.gsub!(/\s*-\s*/, '-')
|
191
|
+
numbers.gsub!(/\s*&\s*/, ' & ')
|
192
|
+
|
193
|
+
numbers.split(/(\s*[,&-]\s*)/)
|
194
|
+
end
|
195
|
+
|
185
196
|
# Tests whether the variable contains numeric content. Content is
|
186
197
|
# considered numeric if it solely consists of numbers. Numbers may have
|
187
198
|
# prefixes and suffixes ("D2", "2b", "L2d"), and may be separated by a
|
data/lib/citeproc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: citeproc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.pre10
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -162,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
162
162
|
version: '0'
|
163
163
|
segments:
|
164
164
|
- 0
|
165
|
-
hash:
|
165
|
+
hash: -3211648624536269637
|
166
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
167
|
none: false
|
168
168
|
requirements:
|