diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-09-25 21:44:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-09-25 21:44:00 +0200 |
commit | 55ce9de27314a53bb5583cf482a2c4c64e3d1f76 (patch) | |
tree | 54918f8483de1304d9d908ff9961399b4850fcad /tex/context/base/l-boolean.lua | |
parent | bd88b34201a32e8c936f518336016f0abae49a09 (diff) | |
download | context-55ce9de27314a53bb5583cf482a2c4c64e3d1f76.tar.gz |
beta 2012.09.25 21:44
Diffstat (limited to 'tex/context/base/l-boolean.lua')
-rw-r--r-- | tex/context/base/l-boolean.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tex/context/base/l-boolean.lua b/tex/context/base/l-boolean.lua index 2d502f164..4294cf8f0 100644 --- a/tex/context/base/l-boolean.lua +++ b/tex/context/base/l-boolean.lua @@ -16,7 +16,9 @@ function boolean.tonumber(b) end function toboolean(str,tolerant) - if tolerant then + if str == true or str == false then + return str + elseif tolerant then local tstr = type(str) if tstr == "string" then return str == "true" or str == "yes" or str == "on" or str == "1" or str == "t" |