@@ -103,14 +103,16 @@ function CslEngine:_init (style, locale, extras)
103103 }
104104
105105 self .subsequentAuthorSubstitute = self .inheritable [" bibliography" ][" subsequent-author-substitute" ]
106- local _ , count = luautf8 .gsub (self .subsequentAuthorSubstitute , " [%-_–—]" , " " ) -- naive count
107- if count > 0 then
108- -- With many fonts, a sequence of dashes is not looking that great.
109- -- So replace them with a command, and let the typesetter decide for a better rendering.
110- -- NOTE: Avoid (quoted) attributes and dashes in tags, as some global
111- -- substitutions might affect quotes...So we use a simple "wrapper" command.
112- local trail = luautf8 .gsub (self .subsequentAuthorSubstitute , " ^[%-–—_]+" , " " )
113- self .subsequentAuthorSubstitute = " <bibRule>" .. count .. " </bibRule>" .. trail
106+ if self .subsequentAuthorSubstitute then
107+ local _ , count = luautf8 .gsub (self .subsequentAuthorSubstitute , " [%-_–—]" , " " ) -- naive count
108+ if count > 0 then
109+ -- With many fonts, a sequence of dashes is not looking that great.
110+ -- So replace them with a command, and let the typesetter decide for a better rendering.
111+ -- NOTE: Avoid (quoted) attributes and dashes in tags, as some global
112+ -- substitutions might affect quotes...So we use a simple "wrapper" command.
113+ local trail = luautf8 .gsub (self .subsequentAuthorSubstitute , " ^[%-–—_]+" , " " )
114+ self .subsequentAuthorSubstitute = " <bibRule>" .. count .. " </bibRule>" .. trail
115+ end
114116 end
115117end
116118
0 commit comments