File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -263,7 +263,20 @@ export class Citation implements IProvider {
263
263
}
264
264
const abbreviations : { [ key : string ] : string } = { }
265
265
ast . content . filter ( bibtexParser . isStringEntry ) . forEach ( ( entry : bibtexParser . StringEntry ) => {
266
- abbreviations [ entry . abbreviation ] = entry . value . content
266
+ // @string {string1 = "Proceedings of the "}
267
+ // @string {string2 = string1 # "Foo"}
268
+ if ( typeof entry . value . content === 'string' ) {
269
+ abbreviations [ entry . abbreviation ] = entry . value . content
270
+ } else {
271
+ abbreviations [ entry . abbreviation ] =
272
+ ( entry . value . content as ( bibtexParser . AbbreviationValue | bibtexParser . TextStringValue ) [ ] ) . map ( subEntry => {
273
+ if ( bibtexParser . isAbbreviationValue ( subEntry ) ) {
274
+ return abbreviations [ subEntry . content ] ?? `undefined @string "${ subEntry . content } "`
275
+ } else {
276
+ return subEntry . content
277
+ }
278
+ } ) . join ( '' )
279
+ }
267
280
} )
268
281
ast . content
269
282
. filter ( bibtexParser . isEntry )
You can’t perform that action at this time.
0 commit comments