Skip to content

Commit 7c001f1

Browse files
author
charlie
committed
Checks only for whitespace for quoting
1 parent 8bcb00e commit 7c001f1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/structlog/processors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def logfmt_repr(inst: Any) -> str:
5252
if inst is None:
5353
return "null"
5454
if isinstance(inst, str):
55-
return json.dumps(inst) if re.search("\\W", inst) else inst
55+
return json.dumps(inst) if re.search("\\s", inst) else inst
5656
return repr(inst)
5757

5858

0 commit comments

Comments
 (0)