citeproc 1.0.0.pre9 → 1.0.0.pre10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
@@ -1,3 +1,3 @@
1
1
  module CiteProc
2
- VERSION = '1.0.0.pre9'.freeze
2
+ VERSION = '1.0.0.pre10'.freeze
3
3
  end
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.pre9
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-19 00:00:00.000000000 Z
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: 614723229358903967
165
+ hash: -3211648624536269637
166
166
  required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  none: false
168
168
  requirements: