Browse Source

Changed regex in formatAuthorInitials to work correctly with unicode firstnames

pull/42/head
Klaus-Hendrik Wolf 10 years ago
parent
commit
905ac6feb2
  1. 2
      bibtexbrowser.php

2
bibtexbrowser.php

@ -1315,7 +1315,7 @@ class BibEntry {
*/ */
function formatAuthorInitials($author){ function formatAuthorInitials($author){
list($firstname, $lastname) = splitFullName($author); list($firstname, $lastname) = splitFullName($author);
if ($firstname!='') return $lastname.' '.preg_replace("/(\p{Lu})\w*[- ]*/S","$1", $firstname);
if ($firstname!='') return $lastname.' '.preg_replace("/(\p{Lu})\w*[- ]*/Su","$1", $firstname);
else return $lastname; else return $lastname;
} }

Loading…
Cancel
Save