Only in zotero-trunk/chrome/content/zotero: about.xul~
Only in zotero-trunk/chrome/content/zotero: lexdowngradewizard.xul~
Only in zotero-trunk/chrome/content/zotero: lexupgradewizard.xul~
Only in zotero-trunk/chrome/content/zotero: overlay.xul~
Only in zotero-trunk/chrome/content/zotero: upgrade.xul~
diff -u -r zotero-trunk.orig/chrome/content/zotero/xpcom/csl.js zotero-trunk/chrome/content/zotero/xpcom/csl.js
|
old
|
new
|
|
| 2 | 2 | ***** BEGIN LICENSE BLOCK ***** |
| 3 | 3 | |
| 4 | 4 | Copyright (c) 2006 Center for History and New Media |
| 5 | | George Mason University, Fairfax, Virginia, USA |
| | 5 | George Mason University, Fairfax, Virginia, USA |
| 6 | 6 | http://chnm.gmu.edu |
| 7 | 7 | |
| 8 | 8 | Licensed under the Educational Community License, Version 1.0 (the "License"); |
| … |
… |
|
| 814 | 814 | success = true; |
| 815 | 815 | } |
| 816 | 816 | } |
| 817 | | |
| 818 | 817 | if(success) { |
| 819 | | formattedString.concat(newString, child); |
| | 818 | // see comment to Zotero.CSL.FormattedString.prototype.concat, below |
| | 819 | formattedString.concat(newString, child, true); |
| 820 | 820 | dataAppended = true; |
| 821 | 821 | } |
| 822 | 822 | } else if(child.@macro.length()) { |
| … |
… |
|
| 2673 | 2673 | } |
| 2674 | 2674 | |
| 2675 | 2675 | Zotero.CSL.FormattedString._punctuation = "!.,?:"; |
| | 2676 | Zotero.CSL.FormattedString._faces = ['normal','italic']; |
| 2676 | 2677 | |
| 2677 | 2678 | /* |
| 2678 | 2679 | * attaches another formatted string to the end of the current one |
| | 2680 | * |
| | 2681 | * parameter textTagFlag limits alternative font markup parsing to strings |
| | 2682 | * as passed immediately from a <text variable="XX"/> tag. Strings |
| | 2683 | * passed by <text macro=XX"/> are not parsed. |
| 2679 | 2684 | */ |
| 2680 | | Zotero.CSL.FormattedString.prototype.concat = function(formattedString, element) { |
| | 2685 | Zotero.CSL.FormattedString.prototype.concat = function(formattedString, element, textTagFlag) { |
| 2681 | 2686 | default xml namespace = "http://purl.org/net/xbiblio/csl"; with({}); |
| 2682 | 2687 | |
| 2683 | 2688 | if(!formattedString || !formattedString.string) { |
| … |
… |
|
| 2699 | 2704 | suffix = element.@suffix.toString(); |
| 2700 | 2705 | element.@suffix = []; |
| 2701 | 2706 | } |
| 2702 | | haveAppended = this.append(formattedString.string, element, false, true); |
| | 2707 | // apply alternative typeface, rm->it, it->rm according |
| | 2708 | // to paired asterisks. double asterisk is escape. |
| | 2709 | // |
| | 2710 | var string = formattedString.string.replace(/\*\*/g, "[[ASTERISK]]"); |
| | 2711 | // save the effort in most cases |
| | 2712 | if ( textTagFlag && string.match(/.*\*[^*]+\*.*/)) { |
| | 2713 | var start = 0; |
| | 2714 | if ( element && element['@font-style'] == 'italic' ) { |
| | 2715 | var start = 1; |
| | 2716 | } |
| | 2717 | if (string.indexOf("*") == 0 ) { |
| | 2718 | var start = ( start + 1 ) % 2; |
| | 2719 | } |
| | 2720 | var split = string.split(/\*([^*]+)\*/); |
| | 2721 | for (i=0; i<split.length; i++) { |
| | 2722 | pos = ( start + i ) % 2; |
| | 2723 | element['@font-style'] = Zotero.CSL.FormattedString._faces[pos]; |
| | 2724 | this.append(split[i].replace(/\[\[ASTERISK\]\]/g, "*"), element, false, true); |
| | 2725 | if (i == 0) { |
| | 2726 | element.@prefix = []; |
| | 2727 | } |
| | 2728 | } |
| | 2729 | haveAppended = true; |
| | 2730 | } else { |
| | 2731 | haveAppended = this.append(formattedString.string, element, false, true); |
| | 2732 | } |
| 2703 | 2733 | } |
| 2704 | 2734 | |
| 2705 | 2735 | // if there's close punctuation to append, that also counts |
| … |
… |
|
| 2731 | 2761 | if(typeof(string) != "string") { |
| 2732 | 2762 | string = string.toString(); |
| 2733 | 2763 | } |
| 2734 | | |
| | 2764 | |
| 2735 | 2765 | // get prefix |
| 2736 | 2766 | var prefix = ""; |
| 2737 | 2767 | if(element && element.@prefix.length()) { |