citeproc-ruby 0.0.6 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.document +4 -0
  4. data/.gitignore +10 -0
  5. data/.rspec +3 -0
  6. data/.simplecov +4 -0
  7. data/.travis.yml +17 -0
  8. data/.yardopts +2 -0
  9. data/AGPL +662 -0
  10. data/BSDL +29 -0
  11. data/Gemfile +42 -0
  12. data/Guardfile +14 -0
  13. data/README.md +32 -76
  14. data/Rakefile +60 -0
  15. data/citeproc-ruby.gemspec +46 -0
  16. data/cucumber.yml +1 -0
  17. data/features/bibliography.feature +25 -0
  18. data/features/name_options.feature +37 -0
  19. data/features/names.feature +192 -0
  20. data/features/renderer.feature +74 -0
  21. data/features/sort.feature +50 -0
  22. data/features/step_definitions/renderer.rb +80 -0
  23. data/features/support/env.rb +33 -0
  24. data/features/support/hooks.rb +10 -0
  25. data/lib/citeproc/ruby.rb +32 -0
  26. data/lib/citeproc/ruby/engine.rb +122 -0
  27. data/lib/citeproc/ruby/format.rb +303 -0
  28. data/lib/citeproc/ruby/formats/default.rb +25 -0
  29. data/lib/citeproc/ruby/formats/html.rb +221 -0
  30. data/lib/citeproc/ruby/renderer.rb +140 -0
  31. data/lib/citeproc/ruby/renderer/choose.rb +106 -0
  32. data/lib/citeproc/ruby/renderer/date.rb +90 -0
  33. data/lib/citeproc/ruby/renderer/format.rb +129 -0
  34. data/lib/citeproc/ruby/renderer/group.rb +34 -0
  35. data/lib/citeproc/ruby/renderer/history.rb +40 -0
  36. data/lib/citeproc/ruby/renderer/label.rb +66 -0
  37. data/lib/citeproc/ruby/renderer/layout.rb +20 -0
  38. data/lib/citeproc/ruby/renderer/locale.rb +26 -0
  39. data/lib/citeproc/ruby/renderer/macro.rb +20 -0
  40. data/lib/citeproc/ruby/renderer/names.rb +401 -0
  41. data/lib/citeproc/ruby/renderer/number.rb +41 -0
  42. data/lib/citeproc/ruby/renderer/observer.rb +44 -0
  43. data/lib/citeproc/ruby/renderer/state.rb +96 -0
  44. data/lib/citeproc/ruby/renderer/text.rb +62 -0
  45. data/lib/citeproc/ruby/sort.rb +82 -0
  46. data/lib/citeproc/ruby/version.rb +5 -0
  47. data/spec/citeproc/ruby/engine_spec.rb +94 -0
  48. data/spec/citeproc/ruby/formats/default_spec.rb +159 -0
  49. data/spec/citeproc/ruby/formats/html_spec.rb +162 -0
  50. data/spec/citeproc/ruby/renderer/choose_spec.rb +293 -0
  51. data/spec/citeproc/ruby/renderer/date_spec.rb +173 -0
  52. data/spec/citeproc/ruby/renderer/group_spec.rb +88 -0
  53. data/spec/citeproc/ruby/renderer/history_spec.rb +38 -0
  54. data/spec/citeproc/ruby/renderer/label_spec.rb +225 -0
  55. data/spec/citeproc/ruby/renderer/layout_spec.rb +41 -0
  56. data/spec/citeproc/ruby/renderer/macro_spec.rb +31 -0
  57. data/spec/citeproc/ruby/renderer/names_spec.rb +396 -0
  58. data/spec/citeproc/ruby/renderer/number_spec.rb +120 -0
  59. data/spec/citeproc/ruby/renderer/text_spec.rb +120 -0
  60. data/spec/citeproc/ruby/renderer_spec.rb +65 -0
  61. data/spec/fixtures/items.rb +80 -0
  62. data/{resource/locale → spec/fixtures/locales}/locales-en-US.xml +2 -11
  63. data/{resource/locale → spec/fixtures/locales}/locales-fr-FR.xml +77 -66
  64. data/{resource/style → spec/fixtures/styles}/apa.csl +5 -5
  65. data/spec/spec_helper.rb +67 -14
  66. metadata +121 -211
  67. data/lib/citeproc.rb +0 -100
  68. data/lib/citeproc/bibliography.rb +0 -57
  69. data/lib/citeproc/data.rb +0 -149
  70. data/lib/citeproc/date.rb +0 -133
  71. data/lib/citeproc/formatter.rb +0 -38
  72. data/lib/citeproc/item.rb +0 -53
  73. data/lib/citeproc/name.rb +0 -284
  74. data/lib/citeproc/processor.rb +0 -166
  75. data/lib/citeproc/selector.rb +0 -61
  76. data/lib/citeproc/variable.rb +0 -82
  77. data/lib/citeproc/version.rb +0 -3
  78. data/lib/csl/locale.rb +0 -223
  79. data/lib/csl/node.rb +0 -72
  80. data/lib/csl/nodes.rb +0 -1418
  81. data/lib/csl/renderer.rb +0 -88
  82. data/lib/csl/sort.rb +0 -61
  83. data/lib/csl/style.rb +0 -110
  84. data/lib/csl/term.rb +0 -124
  85. data/lib/extensions/core.rb +0 -43
  86. data/lib/plugins/filters/bibtex.rb +0 -12
  87. data/lib/plugins/formats/default.rb +0 -134
  88. data/lib/plugins/formats/html.rb +0 -67
  89. data/lib/support/attributes.rb +0 -99
  90. data/lib/support/compatibility.rb +0 -83
  91. data/lib/support/tree.rb +0 -80
  92. data/resource/locale/locales-af-ZA.xml +0 -305
  93. data/resource/locale/locales-ar-AR.xml +0 -306
  94. data/resource/locale/locales-bg-BG.xml +0 -305
  95. data/resource/locale/locales-ca-AD.xml +0 -305
  96. data/resource/locale/locales-cs-CZ.xml +0 -305
  97. data/resource/locale/locales-da-DK.xml +0 -305
  98. data/resource/locale/locales-de-AT.xml +0 -304
  99. data/resource/locale/locales-de-CH.xml +0 -304
  100. data/resource/locale/locales-de-DE.xml +0 -332
  101. data/resource/locale/locales-el-GR.xml +0 -305
  102. data/resource/locale/locales-en-GB.xml +0 -304
  103. data/resource/locale/locales-es-ES.xml +0 -305
  104. data/resource/locale/locales-et-EE.xml +0 -304
  105. data/resource/locale/locales-eu.xml +0 -305
  106. data/resource/locale/locales-fa-IR.xml +0 -304
  107. data/resource/locale/locales-fi-FI.xml +0 -304
  108. data/resource/locale/locales-fr-CA.xml +0 -306
  109. data/resource/locale/locales-he-IL.xml +0 -304
  110. data/resource/locale/locales-hu-HU.xml +0 -305
  111. data/resource/locale/locales-is-IS.xml +0 -304
  112. data/resource/locale/locales-it-IT.xml +0 -305
  113. data/resource/locale/locales-ja-JP.xml +0 -305
  114. data/resource/locale/locales-kh-KH.xml +0 -303
  115. data/resource/locale/locales-km-KH.xml +0 -304
  116. data/resource/locale/locales-ko-KR.xml +0 -305
  117. data/resource/locale/locales-mn-MN.xml +0 -306
  118. data/resource/locale/locales-nb-NO.xml +0 -304
  119. data/resource/locale/locales-nl-NL.xml +0 -304
  120. data/resource/locale/locales-nn-NO.xml +0 -304
  121. data/resource/locale/locales-pl-PL.xml +0 -305
  122. data/resource/locale/locales-pt-BR.xml +0 -304
  123. data/resource/locale/locales-pt-PT.xml +0 -305
  124. data/resource/locale/locales-ro-RO.xml +0 -305
  125. data/resource/locale/locales-ru-RU.xml +0 -306
  126. data/resource/locale/locales-sk-SK.xml +0 -304
  127. data/resource/locale/locales-sl-SI.xml +0 -305
  128. data/resource/locale/locales-sr-RS.xml +0 -305
  129. data/resource/locale/locales-sv-SE.xml +0 -305
  130. data/resource/locale/locales-th-TH.xml +0 -304
  131. data/resource/locale/locales-tr-TR.xml +0 -305
  132. data/resource/locale/locales-uk-UA.xml +0 -306
  133. data/resource/locale/locales-vi-VN.xml +0 -305
  134. data/resource/locale/locales-zh-CN.xml +0 -304
  135. data/resource/locale/locales-zh-TW.xml +0 -305
  136. data/resource/schema/csl-categories.rnc +0 -39
  137. data/resource/schema/csl-data.rnc +0 -98
  138. data/resource/schema/csl-terms.rnc +0 -106
  139. data/resource/schema/csl-types.rnc +0 -39
  140. data/resource/schema/csl-variables.rnc +0 -182
  141. data/resource/schema/csl.rnc +0 -941
  142. data/resource/style/bibtex.csl +0 -177
  143. data/resource/style/chicago-annotated-bibliography.csl +0 -513
  144. data/resource/style/chicago-author-date-basque.csl +0 -707
  145. data/resource/style/chicago-author-date-de.csl +0 -394
  146. data/resource/style/chicago-author-date-listing.csl +0 -434
  147. data/resource/style/chicago-author-date.csl +0 -425
  148. data/resource/style/chicago-dated-note-biblio-no-ibid.csl +0 -472
  149. data/resource/style/chicago-fullnote-bibliography-bb.csl +0 -928
  150. data/resource/style/chicago-fullnote-bibliography-delimiter-fixes.csl +0 -972
  151. data/resource/style/chicago-fullnote-bibliography-no-ibid-delimiter-fixes.csl +0 -963
  152. data/resource/style/chicago-fullnote-bibliography-no-ibid.csl +0 -785
  153. data/resource/style/chicago-fullnote-bibliography.csl +0 -803
  154. data/resource/style/chicago-library-list.csl +0 -511
  155. data/resource/style/chicago-note-biblio-no-ibid.csl +0 -514
  156. data/resource/style/chicago-note-bibliography.csl +0 -530
  157. data/resource/style/chicago-note.csl +0 -388
  158. data/resource/style/chicago-quick-copy.csl +0 -685
  159. data/resource/style/ieee.csl +0 -299
  160. data/resource/style/mla-notes.csl +0 -796
  161. data/resource/style/mla-underline.csl +0 -175
  162. data/resource/style/mla-url.csl +0 -214
  163. data/resource/style/mla.csl +0 -394
  164. data/resource/style/vancouver-brackets.csl +0 -256
  165. data/resource/style/vancouver-superscript-bracket-only-year.csl +0 -165
  166. data/resource/style/vancouver-superscript.csl +0 -256
  167. data/resource/style/vancouver.csl +0 -256
  168. data/spec/citeproc/bibliography_spec.rb +0 -45
  169. data/spec/citeproc/citeproc_spec.rb +0 -80
  170. data/spec/citeproc/date_spec.rb +0 -89
  171. data/spec/citeproc/formatter_spec.rb +0 -101
  172. data/spec/citeproc/item_spec.rb +0 -71
  173. data/spec/citeproc/name_spec.rb +0 -30
  174. data/spec/citeproc/processor_spec.rb +0 -61
  175. data/spec/citeproc/selector_spec.rb +0 -82
  176. data/spec/citeproc/variable_spec.rb +0 -69
  177. data/spec/csl/locale_spec.rb +0 -208
  178. data/spec/csl/node_spec.rb +0 -25
  179. data/spec/csl/nodes_spec.rb +0 -145
  180. data/spec/csl/style_spec.rb +0 -62
  181. data/spec/csl/term_spec.rb +0 -56
  182. data/spec/fixtures/dates.yaml +0 -80
  183. data/spec/fixtures/names.yaml +0 -115
  184. data/spec/fixtures/nodes.yaml +0 -245
  185. data/spec/support/attributes_spec.rb +0 -39
  186. data/spec/support/tree_spec.rb +0 -163
@@ -1,25 +0,0 @@
1
- module CSL
2
- describe Node do
3
-
4
- describe 'CSL.Node utility function' do
5
- # it 'returns a new Node from an empty Hash' do
6
- # CSL.Node({}).should_not be_nil
7
- # end
8
- end
9
-
10
- describe '#new' do
11
- it { should_not be_nil }
12
- end
13
-
14
- describe '.create' do
15
- it 'accepts an empty hash and returns a new Node' do
16
- Node.create({}).is_a?(Node).should be true
17
- end
18
-
19
- it 'creates a new node with the given parameters' do
20
- Node.create(:foo => 'foo')[:foo].should == 'foo'
21
- end
22
- end
23
-
24
- end
25
- end
@@ -1,145 +0,0 @@
1
- module CSL
2
- class Nodes
3
-
4
- describe Nodes do
5
-
6
- let(:style) { Style.new }
7
- let(:locale) { CSL.default_locale }
8
-
9
- let(:node) { Node.new('<node/>') }
10
-
11
- describe '#new' do
12
- it 'parses an xml node' do
13
- node.nil?.should_not be true
14
- end
15
-
16
- it 'supports multiple arguments' do
17
- n = Node.new(node, style, '<node/>')
18
- n.parent.should == node
19
- n.style.should == style
20
- end
21
-
22
- it 'parses child elements' do
23
- child = Node.new('<node><node/></node>', node)
24
- child.parent.should == node
25
- child.children.length.should == 1
26
- child.children.first.parent.should == child
27
- end
28
-
29
- it 'parses comments and the comment node provides an evaluate method' do
30
- child = Node.new('<node><!-- <node/> --></node>')
31
- child.children.first.respond_to?(:evaluate).should be true
32
- end
33
-
34
- it 'pushes style to children' do
35
- child = Node.new('<node><node/></node>', style)
36
- child.children.first.style.should == style
37
- end
38
-
39
- it 'supports a self yielding block' do
40
- Node.new { |n| n.parent = node }.parent.should == node
41
- end
42
-
43
- it 'accepts an attributes hash' do
44
- Node.new('foo' => 'bar')['foo'].should == 'bar'
45
- end
46
- end
47
-
48
-
49
- describe Text do
50
-
51
- describe '#new' do
52
- it 'parses an xml node' do
53
- Text.new('<text/>', style).nil?.should_not be true
54
- end
55
-
56
- end
57
-
58
- describe 'attributes' do
59
- it 'are initialised correctly' do
60
- xml = [
61
- '<text term="editorial-director" plural="false" />',
62
- '<text term="editorial-director" plural="true" />',
63
- '<text term="section" form="symbol" plural="false" />',
64
- '<text term="section" form="symbol" plural="true" />']
65
-
66
- expected = [true, 'editorial-director', false, nil, false, 'false',
67
- true, 'editorial-director', false, nil, true, 'true',
68
- true, 'section', true, 'symbol', false, 'false',
69
- true, 'section', true, 'symbol', true, 'true']
70
-
71
- result = xml.map { |t|
72
- item = CiteProc::Item.new
73
- text = CSL::Nodes::Text.new(Nokogiri::XML(t).root, @style)
74
- [text.term?, text.term, text.form?, text.form, text.plural?, text.plural]
75
- }.flatten
76
-
77
- result.should == expected
78
- end
79
- end
80
-
81
- end
82
-
83
- describe Number do
84
-
85
- describe '#new' do
86
-
87
- it { should_not be_nil }
88
-
89
- it 'parses an XML node' do
90
- number = Number.new('<number/>', style)
91
- number.should_not be_nil
92
- number.style.should_not be_nil
93
- number.form?.should be false
94
- number.variable?.should be false
95
- end
96
- end
97
-
98
- end
99
-
100
- describe Date do
101
- let(:date) { Date.new }
102
-
103
- describe '#new' do
104
- it { should_not be_nil }
105
- end
106
-
107
- describe '#merge_parts' do
108
- it 'merges two empty lists' do
109
- date.merge_parts([], []).should be_empty
110
- end
111
-
112
- it 'merges an empty list and a list of date-parts' do
113
- date.merge_parts([], locale.date['text']).should be_empty
114
- end
115
-
116
- it 'merges a list of date-parts and an empty list' do
117
- date.merge_parts(locale.date['text'], []).map(&:to_s).should == locale.date['text'].map(&:to_s)
118
- end
119
-
120
- it 'merges a list of date-parts with itself' do
121
- date.merge_parts(locale.date['text'], locale.date['text']).map(&:to_s).should == locale.date['text'].map(&:to_s)
122
- end
123
-
124
- it 'filters according to the date-parts attribute' do
125
- date.date_parts = 'year'
126
- date.merge_parts(locale.date['text'], []).should have(1).part
127
- date.date_parts = 'month-day'
128
- date.merge_parts(locale.date['text'], []).should have(2).parts
129
- end
130
-
131
- it 'copies attribute values' do
132
- date.merge_parts([DatePart.new({'name' => 'year'})], [DatePart.new({'name' => 'year', 'foo' => 'bar'})]).first['foo'].should == 'bar'
133
- end
134
- end
135
-
136
- describe '#date_parts' do
137
- it 'returns year-month-day by default' do
138
- date.date_parts.should == 'year-month-day'
139
- end
140
- end
141
-
142
- end
143
- end
144
- end
145
- end
@@ -1,62 +0,0 @@
1
- module CSL
2
-
3
- describe Style do
4
-
5
- let(:style) { Style.new }
6
- let(:apa) { Style.new.open('apa') }
7
-
8
- describe '#open' do
9
- it 'accepts a style name' do
10
- style.open('apa').id.should_not be_empty
11
- end
12
-
13
- it 'accepts a filename' do
14
- style.open(File.expand_path('../../../resource/style/apa.csl', __FILE__)).id.should_not be_empty
15
- end
16
-
17
- it 'accepts an inline style' do
18
- style.open(File.read(File.expand_path('../../../resource/style/apa.csl', __FILE__))).id.should_not be_empty
19
- end
20
-
21
- # -- requires internet connection
22
- # it 'accepts an URI' do
23
- # style.open 'http://www.zotero.org/styles/apa'
24
- # style.id.should == 'http://www.zotero.org/styles/apa'
25
- # end
26
-
27
- end
28
-
29
- describe 'info' do
30
- it 'returns id, title, and link information' do
31
- # style.id.should == 'http://www.zotero.org/styles/apa'
32
- # style.link.should == 'http://www.zotero.org/styles/apa'
33
- apa.title.should =~ /American Psychological Association/
34
- end
35
- end
36
-
37
- describe 'macros' do
38
- it 'initialises a macros hash' do
39
- apa.macros.keys.sort.should include("issued")
40
- apa.macros.values.map(&:class).uniq.should == [CSL::Nodes::Macro]
41
- end
42
- end
43
-
44
- describe 'citation renderer' do
45
- it 'initialises the citation renderer' do
46
- apa.citation.respond_to?(:process)
47
- end
48
-
49
- it 'contains a layout section' do
50
- apa.citation.layout.should_not == nil
51
- end
52
-
53
- end
54
-
55
- describe 'bibliography renderer' do
56
- it 'initialises the bibliography renderer' do
57
- apa.bibliography.should_not == nil
58
- end
59
- end
60
-
61
- end
62
- end
@@ -1,56 +0,0 @@
1
- module CSL
2
-
3
- describe Term do
4
-
5
- let(:xml) { '<term name="test" gender="neutral"><single>test</single><multiple>tests</multiple></term>' }
6
- let(:hash) { { 'long' => { 'singular' => 'test', 'plural' => 'tests' } } }
7
-
8
- describe '#new' do
9
- it 'defaults to an empty string' do
10
- Term.new.to_s.should be_empty
11
- end
12
-
13
- it 'parses an XML string' do
14
- Term.new(xml).to_s.should == 'test'
15
- end
16
-
17
- it 'parses a hash' do
18
- Term.new(hash).to_s.should == 'test'
19
- end
20
-
21
- it 'supports a self yielding block' do
22
- Term.new do |t|
23
- t['long'] = { 'singular' => 'test', 'plural' => 'tests' }
24
- end.to_s.should == 'test'
25
- end
26
- end
27
-
28
- describe '#pluralize' do
29
- it 'returns the terms plural form' do
30
- Term.new(hash).pluralize.should == 'tests'
31
- end
32
- end
33
-
34
- describe '#singularize' do
35
- it 'returns the terms singular form' do
36
- Term.new(hash).singularize.should == 'test'
37
- end
38
- end
39
-
40
- describe 'gender' do
41
- it 'parses the gender attribute' do
42
- Term.new(xml).should have_gender
43
- Term.new(xml).should be_neutral
44
- Term.new(xml).should_not be_masculine
45
- Term.new(xml).should_not be_feminine
46
- end
47
-
48
- it 'has no gender by default' do
49
- Term.new.should_not have_gender
50
- Term.new(hash).should_not have_gender
51
- end
52
-
53
- end
54
- end
55
-
56
- end
@@ -1,80 +0,0 @@
1
- ---
2
- display:
3
- - it: returns an empty string by default
4
- dates:
5
- - {}
6
- expected:
7
- - ""
8
- options: {}
9
- json-api:
10
- - it: supports simple parts
11
- dates:
12
- - date-parts:
13
- - - "2000"
14
- - "1"
15
- - "15"
16
- expected:
17
- - '{"date-parts":[[2000,1,15]]}'
18
- options: {}
19
- - it: supports integers and strings parts
20
- dates:
21
- - date-parts:
22
- - - "2000"
23
- - "1"
24
- - "15"
25
- - date-parts:
26
- - - 2000
27
- - 1
28
- - 15
29
- - date-parts:
30
- - - '2000'
31
- - 1
32
- - '15'
33
- expected:
34
- - '{"date-parts":[[2000,1,15]]}'
35
- - '{"date-parts":[[2000,1,15]]}'
36
- - '{"date-parts":[[2000,1,15]]}'
37
- options: {}
38
- - it: supports negative years
39
- dates:
40
- - date-parts:
41
- - - -200
42
- expected:
43
- - '{"date-parts":[[-200]]}'
44
- options: {}
45
- - it: supports additional elements
46
- dates:
47
- - season: '1'
48
- date-parts:
49
- - - 1950
50
- - season: 'Trinity'
51
- date-parts:
52
- - - 1975
53
- expected:
54
- - '{"season":"1","date-parts":[[1950]]}'
55
- - '{"season":"Trinity","date-parts":[[1975]]}'
56
- options: {}
57
- - it: supports open and closed ranges
58
- dates:
59
- - date-parts:
60
- - - 2000
61
- - 11
62
- - - 2000
63
- - 12
64
- - date-parts:
65
- - - 2000
66
- - 11
67
- - - 0
68
- - 0
69
- expected:
70
- - '{"date-parts":[[2000,11],[2000,12]]}'
71
- - '{"date-parts":[[2000,11],[0,0]]}'
72
- options: {}
73
- - it: supports string literals and raw strings
74
- dates:
75
- - literal: 13th century
76
- - raw: 23 May 1955
77
- expected:
78
- - '{"literal":"13th century"}'
79
- - '{"date-parts":[[1955,5,23]]}'
80
- options: {}
@@ -1,115 +0,0 @@
1
- ---
2
- display:
3
- - it: returns an empty string by default
4
- names:
5
- - {}
6
- expected:
7
- - ""
8
- options: {}
9
- - it: returns a name in the correct default order
10
- names:
11
- - given: John
12
- - family: Plato
13
- - given: Edgar Allen
14
- family: Poe
15
- - given: Gérard
16
- dropping-particle: de
17
- non-dropping-particle: la
18
- family: Martinière
19
- suffix: III
20
- expected:
21
- - "John"
22
- - "Plato"
23
- - "Edgar Allen Poe"
24
- - "Gérard de la Martinière III"
25
- options: {}
26
- - it: returns a name in correct order
27
- names:
28
- - given: John
29
- - family: Plato
30
- suffix: II
31
- - given: Edgar Allen
32
- family: Poe
33
- - given: Gérard
34
- dropping-particle: de
35
- non-dropping-particle: la
36
- family: Martinière
37
- suffix: III
38
- expected:
39
- - "John"
40
- - "Plato, II"
41
- - "Poe, Edgar Allen"
42
- - "la Martinière, Gérard de, III"
43
- options:
44
- name-as-sort-order: "true"
45
- demote-non-dropping-particle: "never"
46
- sort:
47
- - it: sorts an empty list
48
- names: []
49
- expected: []
50
- options: {}
51
- - it: sorts a list containing only a single element
52
- names:
53
- - {}
54
- expected:
55
- - ""
56
- options: {}
57
- - it: sorts a list containing multiple elements
58
- names:
59
- - given: John
60
- - family: Plato
61
- - given: Edgar Allen
62
- family: Poe
63
- - given: Gérard
64
- dropping-particle: de
65
- non-dropping-particle: la
66
- family: Martinière
67
- suffix: III
68
- expected:
69
- - "John"
70
- - "Gérard de la Martinière III"
71
- - "Plato"
72
- - "Edgar Allen Poe"
73
- options: {}
74
- - it: parses names correctly
75
- names:
76
- - family: van Gogh
77
- given: Vincent
78
- parse-names: "true"
79
- - family: van Gogh
80
- given: Vincent
81
- - family: Humbolt
82
- given: Alexander von
83
- parse-names: "true"
84
- - family: King
85
- given: "Martin Luther, Jr."
86
- parse-names: "true"
87
- - family: King
88
- given: "Martin Luther, Jr."
89
- - family: Gates
90
- given: "William Henry, III"
91
- parse-names: "true"
92
- - family: Bennett
93
- given: "Frank G.,! Jr."
94
- parse-names: "true"
95
- - family: '"van der Vlist"'
96
- given: Eric
97
- parse-names: "true"
98
- - family: van der Vlist
99
- given: Eric
100
- - family: van der Vlist
101
- given: Eric
102
- parse-names: true
103
- expected:
104
- - "Frank G. Bennett, Jr."
105
- - William Henry Gates III
106
- - Vincent van Gogh
107
- - Alexander von Humbolt
108
- - Martin Luther King Jr.
109
- - "Martin Luther, Jr. King"
110
- - Eric van der Vlist
111
- - Eric van der Vlist
112
- - Vincent van Gogh
113
- - Eric van der Vlist
114
- options:
115
- demote-non-dropping-particle: "always"