From fcda005c56e966c94fbc415c29bada05419103b3 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 14 Jun 2016 14:22:51 -0400 Subject: [PATCH] Don't copy environment into array environments. Resolves issue #1468. --- unpacked/jax/input/TeX/jax.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js index eeec47541..b16dafc8e 100644 --- a/unpacked/jax/input/TeX/jax.js +++ b/unpacked/jax/input/TeX/jax.js @@ -53,8 +53,10 @@ else if (top) { this.data.push(item); if (item.env) { - for (var id in this.env) - {if (this.env.hasOwnProperty(id)) {item.env[id] = this.env[id]}} + if (item.copyEnv !== false) { + for (var id in this.env) + {if (this.env.hasOwnProperty(id)) {item.env[id] = this.env[id]}} + } this.env = item.env; } else {item.env = this.env} } @@ -258,7 +260,8 @@ STACKITEM.array = STACKITEM.Subclass({ type: "array", isOpen: true, arraydef: {}, Init: function () { - this.table = []; this.row = []; this.env = {}; this.frame = []; this.hfill = []; + this.table = []; this.row = []; this.frame = []; this.hfill = []; + this.copyEnv = false; this.SUPER(arguments).Init.apply(this,arguments); }, checkItem: function (item) {