Skip to content

Commit

Permalink
Added regeex for matching whitespace
Browse files Browse the repository at this point in the history
Signed-off-by: sanga17 <[email protected]>
  • Loading branch information
sanga1794 committed Feb 24, 2021
1 parent f6eb7c4 commit 8e7053e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/chef/knife/mixin/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def validate_json(json)
# returns true if string is free of non-printable characters (escape sequences)
# this returns false for whitespace escape sequences as well, e.g. \n\t
def printable?(string)
/[^[:print:]]/.match(string)
/[^[:print:]]|[[:space:]]/.match(string)
end
end
end
Expand Down

0 comments on commit 8e7053e

Please sign in to comment.