summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/chem-str.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2016-10-12 20:30:59 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-10-12 20:30:59 +0200
commit1964c078d21c5f1d19a84fa6ef5c038f8ee80652 (patch)
tree833b3c9c678bcc7043560ab2e83daeeb395d6d7c /tex/context/base/mkiv/chem-str.lua
parent236690a6367b25187d37013e1e7fc196c5c44eb8 (diff)
downloadcontext-1964c078d21c5f1d19a84fa6ef5c038f8ee80652.tar.gz
2016-10-12 17:32:00
Diffstat (limited to 'tex/context/base/mkiv/chem-str.lua')
-rw-r--r--tex/context/base/mkiv/chem-str.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/chem-str.lua b/tex/context/base/mkiv/chem-str.lua
index 445b779a1..a40ca76b0 100644
--- a/tex/context/base/mkiv/chem-str.lua
+++ b/tex/context/base/mkiv/chem-str.lua
@@ -287,6 +287,8 @@ end
local remapper = {
["+"] = "p",
["-"] = "m",
+ ["--"] = "mm",
+ ["++"] = "pp",
}
local dchrs = R("09")
@@ -299,7 +301,7 @@ local set = Ct(digit^2)
local colon = P(":")
local equal = P("=")
local other = 1 - digit - colon - equal
-local remapped = sign / remapper
+local remapped = (sign * sign + sign) / remapper
local operation = Cs(other^1)
local special = (colon * C(other^1)) + Cc("")
local text = (equal * C(P(1)^0)) + Cc(false)