Skip to content

Commit

Permalink
#365: test for CSLvar status before requesting its type
Browse files Browse the repository at this point in the history
  • Loading branch information
retorquere committed Oct 10, 2015
1 parent ed52ee1 commit 95051ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions resource/tests/export.feature
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ Scenario Outline: BibLaTeX Export

Examples:
| file | references |
| Export C as {v C}, not v{C} #152 | 1 |
| Better BibTeX.018 | 1 |
| Underscores break capital-preservation #300 | 1 |
| Numbers confuse capital-preservation #295 | 1 |
| Empty bibtex clause in extra gobbles whatever follows #99 | 1 |
| Better BibTeX.026 | 1 |
| Better BibTeX.027 | 1 |
| capital delta breaks .bib output #141 | 1 |
| Export C as {v C}, not v{C} #152 | 1 |
| Export of item to Better Bibtex fails for auth3_1 #98 | 1 |

@test-cluster-0
Expand Down Expand Up @@ -196,13 +196,13 @@ Scenario Outline: BibLaTeX Export
@test-cluster-1
@bblt
@bblt-1
@failing
Scenario Outline: BibLaTeX Export
Given I import <references> references from 'export/<file>.json'
Then a library export using 'Better BibLaTeX' should match 'export/<file>.bib'

Examples:
| file | references |
| Better BibTeX does not use biblatex fields eprint and eprinttype #170 | 1 |
| Capitalisation in techreport titles #160 | 1 |
| typo stature-statute (zotero item type) #284 | 1 |
| Normalize date ranges in citekeys #356 | 3 |
Expand Down Expand Up @@ -232,7 +232,6 @@ Scenario Outline: BibLaTeX Export
| Better BibLaTeX.020 | 1 |
| Better BibLaTeX.022 | 1 |
| Better BibLaTeX.023 | 1 |
| Better BibTeX does not use biblatex fields eprint and eprinttype #170 | 1 |
| DOI with underscores in extra field #108 | 1 |
| Export Forthcoming as Forthcoming | 1 |
| Exporting of single-field author lacks braces #130 | 1 |
Expand Down
2 changes: 1 addition & 1 deletion resource/translators/translator.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Translator.extractFields = (item) ->
switch
when !m
extra.push(line)
when @CSLVariables[m[1]].type == 'creator'
when @CSLVariables[m[1]]?.type == 'creator'
fields[m[1]] = {value: [], format: 'csl'} unless Array.isArray(fields[m[1]]?.value)
fields[m[1]].value.push(@CSLCreator(m[2].trim()))
when @CSLVariables[m[1]]
Expand Down

0 comments on commit 95051ba

Please sign in to comment.