mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 21:23:45 +01:00
Merge pull request #36003 from overleaf/mfb-truncate-long-fields-in-cards
Truncate long title/author fields in bibtex entry cards GitOrigin-RevId: 588798c4307958fcd60fce258d46419fbb29dab5
This commit is contained in:
committed by
Copybot
parent
a63fd554c3
commit
139ebafdca
@@ -175,6 +175,17 @@ export class BibtexNameList {
|
||||
return `${formatted.slice(0, -1).join(', ')}, and ${formatted[formatted.length - 1]}`
|
||||
}
|
||||
|
||||
/**
|
||||
* All known authors, comma-joined (no "et al." truncation). Comma-only on
|
||||
* purpose: the result is fed through HighlightedText, so a fabricated "and"
|
||||
* would get <mark>ed for queries like "a"/"an" — never synthesise words.
|
||||
*/
|
||||
joinPlain(
|
||||
format: (name: BibtexName) => string = n => n.toFirstLast()
|
||||
): string {
|
||||
return this.names.map(format).join(', ')
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a short author string using family names only. For 3+ names or
|
||||
* when `hasOthers` is true, returns the first surname followed by "et al.".
|
||||
|
||||
Reference in New Issue
Block a user