Skip to content

Commit

Permalink
Return false for comma-safe when term is a value attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Mar 26, 2016
1 parent 358bc1e commit 6c36763
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/load.js
Expand Up @@ -759,7 +759,7 @@ var CSL = {
},
SUPERSCRIPTS_REGEXP: new RegExp("[\u00AA\u00B2\u00B3\u00B9\u00BA\u02B0\u02B1\u02B2\u02B3\u02B4\u02B5\u02B6\u02B7\u02B8\u02E0\u02E1\u02E2\u02E3\u02E4\u1D2C\u1D2D\u1D2E\u1D30\u1D31\u1D32\u1D33\u1D34\u1D35\u1D36\u1D37\u1D38\u1D39\u1D3A\u1D3C\u1D3D\u1D3E\u1D3F\u1D40\u1D41\u1D42\u1D43\u1D44\u1D45\u1D46\u1D47\u1D48\u1D49\u1D4A\u1D4B\u1D4C\u1D4D\u1D4F\u1D50\u1D51\u1D52\u1D53\u1D54\u1D55\u1D56\u1D57\u1D58\u1D59\u1D5A\u1D5B\u1D5C\u1D5D\u1D5E\u1D5F\u1D60\u1D61\u2070\u2071\u2074\u2075\u2076\u2077\u2078\u2079\u207A\u207B\u207C\u207D\u207E\u207F\u2120\u2122\u3192\u3193\u3194\u3195\u3196\u3197\u3198\u3199\u319A\u319B\u319C\u319D\u319E\u319F\u02C0\u02C1\u06E5\u06E6]", "g"),

UPDATE_GROUP_CONTEXT_CONDITION: function (state, termtxt) {
UPDATE_GROUP_CONTEXT_CONDITION: function (state, termtxt, valueTerm) {
if (state.tmp.group_context.tip.condition) {
if (state.tmp.group_context.tip.condition.test) {
var testres;
Expand All @@ -772,13 +772,13 @@ var CSL = {
if (empty) {
testres = true;
} else if (num) {
if (alpha) {
if (alpha && !valueTerm) {
testres = true;
} else {
testres = false;
}
} else {
if (alpha) {
if (alpha && !valueTerm) {
testres = true;
} else {
testres = false;
Expand Down
3 changes: 2 additions & 1 deletion src/node_text.js
Expand Up @@ -348,7 +348,8 @@ CSL.Node.text = {
// for the text value attribute.
func = function (state, Item) {
state.tmp.group_context.tip.term_intended = true;
CSL.UPDATE_GROUP_CONTEXT_CONDITION(state, this.strings.value);
// true flags that this is a literal-value term
CSL.UPDATE_GROUP_CONTEXT_CONDITION(state, this.strings.value, true);
state.output.append(this.strings.value, this);
};
this.execs.push(func);
Expand Down

0 comments on commit 6c36763

Please sign in to comment.