Adding Andy Pascall's bibTex fix

This commit is contained in:
Matt Burton 2009-10-07 21:15:19 +00:00
parent 1f63fecac2
commit 29a8b68830

View file

@ -1815,7 +1815,7 @@ function writeField(field, value, isMacro) {
// I hope these are all the escape characters!
value = value.replace(/[|\<\>\~\^\\]/g, mapEscape).replace(/([\#\$\%\&\_])/g, "\\$1");
// Case of words with uppercase characters in non-initial positions is preserved with braces.
if(!isMacro) value = value.replace(/([^\s]+[A-Z][^\s]*)/g, "{$1}");
if(!isMacro&&field != "pages") value = value.replace(/([^\s]+[A-Z][^\s]*)/g, "{$1}");
}
if (Zotero.getOption("exportCharset") != "UTF-8") {
value = value.replace(/[\u0080-\uFFFF]/g, mapAccent);