Skip to content

Commit c4f5eec

Browse files
committed
Favor splitting SOR on ; over ,
This seems to be consistent in setting off the first name when there are multiple authors. After that, only God knows how the rest of the names are formatted. Some adjustments to search for `and, und, &`
1 parent f29d620 commit c4f5eec

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

src/components/panels/edit/modals/NacoStubCreateModal.vue

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,12 +1588,26 @@
15881588
}
15891589
}
15901590
1591-
if (this.statementOfResponsibility && this.statementOfResponsibility.split(/,?\s+and\s+|,/).length>1){
1592-
this.statementOfResponsibilityOptions = this.statementOfResponsibility.split(/,?\s+and\s+|,/)
1593-
} else if (this.statementOfResponsibility && this.statementOfResponsibility.split(/,?\s+und\s+|\s+e\s+|;/).length>1){
1594-
this.statementOfResponsibilityOptions = this.statementOfResponsibility.split(/,?\s+und\s+|\s+e\s+|;/)
1591+
// /\s{1};\s{1}|,\s*(?=[^)^\]]*(?:\(|\[|$))|\&|and|und/g) --> split on <space>;<space> and commas not in ()
1592+
// favor splitting on semicolon. Seems reliable to get the first name without bleed from other names. But after that, anything can happen
1593+
if (this.statementOfResponsibility && this.statementOfResponsibility.split(/,?\s+and|und|\&\s+|\s+e\s+|;/g).length>1){
1594+
this.statementOfResponsibilityOptions = this.statementOfResponsibility.split(/,?\s+and|und|\&\s+|\s+e\s+|;/g)
1595+
console.info("split semi: ", this.statementOfResponsibilityOptions)
1596+
} else if (this.statementOfResponsibility && this.statementOfResponsibility.split(/,?\s+and|und|\&\s+|,/g).length>1){
1597+
this.statementOfResponsibilityOptions = this.statementOfResponsibility.split(/,?\s+and|und|\&\s+|,/g)
1598+
console.info("split comma: ", this.statementOfResponsibilityOptions)
15951599
}
15961600
1601+
// SOR examples that make rules difficult
1602+
// Cecilia Leibovitz ; photographs by David Lewis Taylor & Talia Marek
1603+
// Ana Rodriguez Alvarez, Jeffrey J. Mora Sanchez (directores) ; prologo E. Raul Zaffaroni; prologo a la edicion costarricense Javier Llobet Rodriguez
1604+
// Sally Friedman and Davy Schultz, Editors
1605+
// Pedro Romaguera Esteva ; pròleg, Dr. Jordi Maíz Chacón, Professor de la UIB
1606+
// Dina de Sousa e Santos (organizadora) ; prefácios, Professor Phillip Rothwell (Universidade de Oxford), Doutora Elisabete Vera Cruz (Universidade Agostinho Neto, UAN)
1607+
// Archie Bogle and Don McKay ; compiled by by Gordon Andreassend, Andrew Blackman and Don McKay
1608+
// editor-in-chief, Elaine Wyllie ; associate editors, Barry E. Gidal, Ahsan Moosa Naduvil Valappil, Howard P. Goodkin, Elaine Wirrell, Stephan Schuele
1609+
// Alberto Pitta ; organização, Thais Darzé, Paulo Darzé ; curadoria e texto, Daniel Rangel
1610+
15971611
let addingDefaultExtraMarcStatements = false
15981612
15991613
if (this.preferenceStore.returnValue('--b-edit-complex-nar-advanced-mode')){

0 commit comments

Comments
 (0)