summaryrefslogtreecommitdiff
path: root/tex/context/base/l-boolean.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2008-08-04 15:59:00 +0200
committerHans Hagen <pragma@wxs.nl>2008-08-04 15:59:00 +0200
commitf8ba0550d77fd6e2b307ff9dd3175fc0c613b8e2 (patch)
treeae27ca6edd0b2f1bcbe315d241b8152107d4e6a3 /tex/context/base/l-boolean.lua
parent1d63a6eae86a6b78d4563ed60521449e4bf89f3c (diff)
downloadcontext-f8ba0550d77fd6e2b307ff9dd3175fc0c613b8e2.tar.gz
stable 2008.08.04 15:59
Diffstat (limited to 'tex/context/base/l-boolean.lua')
-rw-r--r--tex/context/base/l-boolean.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/tex/context/base/l-boolean.lua b/tex/context/base/l-boolean.lua
index 66c608cee..1542238c4 100644
--- a/tex/context/base/l-boolean.lua
+++ b/tex/context/base/l-boolean.lua
@@ -15,7 +15,7 @@ function toboolean(str,tolerant)
if tolerant then
local tstr = type(str)
if tstr == "string" then
- return str == "true" or str == "yes" or str == "on" or str == "1"
+ return str == "true" or str == "yes" or str == "on" or str == "1" or str == "t"
elseif tstr == "number" then
return tonumber(str) ~= 0
elseif tstr == "nil" then
@@ -34,9 +34,9 @@ end
function string.is_boolean(str)
if type(str) == "string" then
- if str == "true" or str == "yes" or str == "on" then
+ if str == "true" or str == "yes" or str == "on" or str == "t" then
return true
- elseif str == "false" or str == "no" or str == "off" then
+ elseif str == "false" or str == "no" or str == "off" or str == "f" then
return false
end
end