diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/lualibs/lualibs-boolean.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/lualibs/lualibs-boolean.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-boolean.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-boolean.lua index 8d11080e7fc..8f18d4c003d 100644 --- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-boolean.lua +++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-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 |