From 2a4c095826fc0fb16831aac35b400b64a564acc3 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Mon, 13 Jul 2020 17:55:07 +0300 Subject: [PATCH] fix(inputs): Only allow reserved characters as 1-char commands --- core/inputs-texlike.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/inputs-texlike.lua b/core/inputs-texlike.lua index a20aea6c5..49772a6b2 100644 --- a/core/inputs-texlike.lua +++ b/core/inputs-texlike.lua @@ -25,7 +25,7 @@ SILE.inputs.TeXlike.parser = function (_ENV) local quote = P'"' local quotedString = quote * C((1-quote)^1) * quote local value = quotedString + (1-S",;]")^1 - local myID = C(SILE.inputs.TeXlike.identifier + P(1)) / 1 + local myID = C(SILE.inputs.TeXlike.identifier + S"{}\\%") / 1 local pair = Cg(myID * _ * "=" * _ * C(value)) * sep^-1 / function (...) local tbl = {...}; return tbl[1], tbl[#tbl] end local list = Cf(Ct"" * pair^0, rawset) local parameters = (