From 2c6477867c9a9e84a1e48134f062ef7706de1499 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 28 Aug 2014 20:19:00 +0200 Subject: beta 2014.08.28 20:19 --- tex/context/base/l-boolean.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tex/context/base/l-boolean.lua') 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 -- cgit v1.2.3