@@ -462,7 +462,7 @@ function CslEngine:_layout (options, content, entries)
462
462
for _ , entry in ipairs (entries ) do
463
463
self :_prerender ()
464
464
local elem = self :_render_children (content , entry , {
465
- secondFieldAlign = self .inheritable .bibliography [" second-field-align" ] and true or false
465
+ secondFieldAlign = self .inheritable .bibliography [" second-field-align" ] and true or false ,
466
466
})
467
467
elem = self :_render_affixes (elem , options )
468
468
elem = self :_render_formatting (elem , options )
@@ -846,13 +846,13 @@ function CslEngine:_name_et_al (options)
846
846
end
847
847
848
848
local function initialize (options , entry )
849
- if SU .boolean (options .initialize , true ) and options [' initialize-with' ] then
849
+ if SU .boolean (options .initialize , true ) and options [" initialize-with" ] then
850
850
-- FIXME TODO Quick and dirty:
851
851
-- Major styles abbreviate the given name with ". " as initialize-with
852
852
-- and don't set initialize-with-hyphen to false.
853
853
-- So here we just use the short name already derived by our BibTeX parser.
854
854
-- ... But this is not general, obviously.
855
- return entry [' given-short' ] .. options [' initialize-with' ]:gsub (" %s*$" , " " )
855
+ return entry [" given-short" ] .. options [" initialize-with" ]:gsub (" %s*$" , " " )
856
856
end
857
857
return entry .given
858
858
end
@@ -861,10 +861,7 @@ function CslEngine:_format_a_name (options, name)
861
861
if not options then
862
862
return name
863
863
end
864
- return self :_render_formatting (
865
- self :_render_textCase (name , options ),
866
- options
867
- )
864
+ return self :_render_formatting (self :_render_textCase (name , options ), options )
868
865
end
869
866
870
867
function CslEngine :_a_name (options , content , entry )
@@ -938,11 +935,8 @@ function CslEngine:_a_name (options, content, entry)
938
935
for _ , namep in ipairs (content ) do
939
936
-- Override with the options for the cs:name-part explicit nodes, if any
940
937
if namep .command == " cs:name-part" then
941
- namePartOptions [namep .options .name ] = pl .tablex .merge (
942
- namePartOptions [namep .options .name ],
943
- namep .options ,
944
- true
945
- )
938
+ namePartOptions [namep .options .name ] =
939
+ pl .tablex .merge (namePartOptions [namep .options .name ], namep .options , true )
946
940
end
947
941
end
948
942
options [" __name-parts" ] = namePartOptions -- memoize
@@ -1197,7 +1191,7 @@ function CslEngine:_names (options, content, entry)
1197
1191
local et_al_use_first = tonumber (name_node .options [" et-al-use-first" ]) or 1
1198
1192
local and_opt = name_node .options [" and" ]
1199
1193
local and_word
1200
- if and_opt == " symbol" then
1194
+ if and_opt == " symbol" then
1201
1195
and_word = " &"
1202
1196
elseif and_opt == " text" then
1203
1197
and_word = self :_render_term (" and" )
@@ -1376,12 +1370,12 @@ function CslEngine:_choose (options, content, entry, context)
1376
1370
local match = self :_if (child .options , child , entry )
1377
1371
if match then
1378
1372
return self :_render_children (child , entry , {
1379
- delimiter = delimiter
1373
+ delimiter = delimiter ,
1380
1374
})
1381
1375
end
1382
1376
elseif child .command == " cs:else" then
1383
1377
return self :_render_children (child , entry , {
1384
- delimiter = delimiter
1378
+ delimiter = delimiter ,
1385
1379
})
1386
1380
end
1387
1381
end
0 commit comments