Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BibTeX: Fix string definition handling and add concatenation support #1519

Closed
dstillman opened this issue Jan 11, 2018 · 1 comment
Closed

Comments

@dstillman
Copy link
Member

I suspect string definition handling has been broken since ff884aa. String definitions are properly read and substituted, but a rawValue isn't passed to processField(), which expects one for name fields:

translators/BibTeX.js

Lines 880 to 888 in 18f8d6a

// see if there's a defined string
if(strings[value]) value = strings[value];
} else {
rawValue = getFieldValue(read);
value = unescapeBibTeX(rawValue);
}
if(item) {
processField(item, field.toLowerCase(), value, rawValue);

This causes an import to hang with rawValue is undefined.

This part could be fixed with value = rawValue = strings[value].

However, it looks like we also don't support concatenation using #, and since that's likely to be used with string definitions, we should fix that at the same time.

Sample entry:

@string{TEST = "Test"}

@book(StringDefinitionTest,
author = TEST # { and Test2},
)

(I don't know when I'll be able to get to this, so it'd be great if someone else could look at this.)

@zuphilip
Copy link
Contributor

zuphilip commented Dec 9, 2019

Fixed in #2020.

@zuphilip zuphilip closed this as completed Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants