summaryrefslogtreecommitdiff
path: root/tex/context/base/l-boolean.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2015-05-16 00:15:04 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2015-05-16 00:15:04 +0200
commitb55577d0998160c0174e250b542016ecd6ca9056 (patch)
tree27093212d5ca3e6ffe4ae434c3ec094233ed37ba /tex/context/base/l-boolean.lua
parent624cbb5da392e9403984dd1cf368c0d408b1c2a8 (diff)
downloadcontext-b55577d0998160c0174e250b542016ecd6ca9056.tar.gz
2015-05-15 23:06:00
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 8d11080e7..8f18d4c00 100644
--- a/tex/context/base/l-boolean.lua
+++ b/tex/context/base/l-boolean.lua
@@ -57,11 +57,11 @@ function string.booleanstring(str)
end
end
-function string.is_boolean(str,default)
+function string.is_boolean(str,default,strict)
if type(str) == "string" then
- if str == "true" or str == "yes" or str == "on" or str == "t" or str == "1" then
+ if str == "true" or str == "yes" or str == "on" or str == "t" or (not strict and str == "1") then
return true
- elseif str == "false" or str == "no" or str == "off" or str == "f" or str == "0" then
+ elseif str == "false" or str == "no" or str == "off" or str == "f" or (not strict and str == "0") then
return false
end
end