File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 5252-- Get metadata specific to bookdown for this filter
5353Meta = function (m )
5454 bookdownmeta = m .bookdown
55- if (bookdownmeta ~= nil ) then
55+ if (bookdownmeta and bookdownmeta . language and bookdownmeta . language . label ) then
5656 -- For internationalization feature of bookdown
57- if (bookdownmeta .language ~= nil ) then
58- if (bookdownmeta .language .label ~= nil ) then
59- for k ,v in pairs (bookdownmeta .language .label ) do
60- if (type (v ) == ' table' and v .t == ' MetaInlines' and proof_label [k ] ~= nil ) then
61- -- remove any undesired space (3 or less)
62- proof_label [k ] = pandoc .utils .stringify (v ):gsub (" %.?%s?%s?%s?$" , " " )
63- print_debug (" Translation-> " .. k .. " :" , proof_label [k ])
64- end
65- end
57+ for k ,v in pairs (bookdownmeta .language .label ) do
58+ if (type (v ) == ' table' and v .t == ' MetaInlines' and proof_label [k ] ~= nil ) then
59+ -- remove any undesired space (3 or less)
60+ proof_label [k ] = pandoc .utils .stringify (v ):gsub (" %.?%s?%s?%s?$" , " " )
61+ print_debug (" Translation-> " .. k .. " :" , proof_label [k ])
6662 end
6763 end
6864 end
You can’t perform that action at this time.
0 commit comments