Skip to content

Commit 980f954

Browse files
authored
Don't use actual linebreaks in log panel if payload is string literal (#1993)
1 parent 1289fe9 commit 980f954

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Syntaxes/ServerLog.sublime-syntax

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ contexts:
8383
- match: $
8484
pop: true
8585
- include: scope:source.python#constants # e.g. shutdown request
86+
- include: scope:source.python#strings
87+
- include: scope:source.python#numbers
8688
- include: scope:source.python#lists
8789
- include: scope:source.python#dictionaries-and-sets
8890
- match: ''

plugin/core/windows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ def log(self, message: str, params: Any) -> None:
506506

507507
def run_on_async_worker_thread() -> None:
508508
nonlocal message
509-
params_str = str(params)
509+
params_str = repr(params)
510510
if 0 < userprefs().log_max_size <= len(params_str):
511511
params_str = '<params with {} characters>'.format(len(params_str))
512512
message = "{}: {}".format(message, params_str)

0 commit comments

Comments
 (0)