mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-05-07 22:04:47 +02:00
fix: Handle leading whitespace in JSON packet line filtering
Strip leading whitespace before checking if line starts with '{' to
ensure JSON packet lines are properly filtered regardless of indentation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -133,7 +133,8 @@ def clean_console_output(output: str, command: str) -> str:
|
||||
continue
|
||||
|
||||
# Skip JSON packet lines (internal mesh protocol data)
|
||||
if stripped.startswith('{') and '"payload_typename"' in stripped:
|
||||
stripped_full = stripped.lstrip()
|
||||
if stripped_full.startswith('{') and '"payload_typename"' in stripped_full:
|
||||
continue
|
||||
|
||||
cleaned_lines.append(line)
|
||||
|
||||
Reference in New Issue
Block a user