From b9b3ae9bc39391d232174633903e88d9633db79b Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Sun, 5 Apr 2026 01:47:23 +0200 Subject: [PATCH] IME newline fix --- .../Monitoring/Tracking/ImeLogTracker.cs | 4 +++- src/Agent/AutopilotMonitor.Agent/Program.ImeMatchingMode.cs | 2 +- src/Agent/AutopilotMonitor.Agent/buildcounter.txt | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Agent/AutopilotMonitor.Agent.Core/Monitoring/Tracking/ImeLogTracker.cs b/src/Agent/AutopilotMonitor.Agent.Core/Monitoring/Tracking/ImeLogTracker.cs index 3bcaa5b7..9edaae6a 100644 --- a/src/Agent/AutopilotMonitor.Agent.Core/Monitoring/Tracking/ImeLogTracker.cs +++ b/src/Agent/AutopilotMonitor.Agent.Core/Monitoring/Tracking/ImeLogTracker.cs @@ -170,7 +170,9 @@ namespace AutopilotMonitor.Agent.Core.Monitoring.Tracking { // Replace {GUID} placeholder with actual GUID capture regex var regexStr = pattern.Pattern.Replace("{GUID}", GuidPattern); - var regex = new Regex(regexStr, RegexOptions.IgnoreCase | RegexOptions.Compiled, TimeSpan.FromSeconds(1)); + // Singleline: make '.' match newlines too — required because multiline CMTrace + // entries are reassembled with '\n' chars (e.g. DO TEL JSON in IME >= 1.101) + var regex = new Regex(regexStr, RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.Singleline, TimeSpan.FromSeconds(1)); var compiled = new CompiledPattern { diff --git a/src/Agent/AutopilotMonitor.Agent/Program.ImeMatchingMode.cs b/src/Agent/AutopilotMonitor.Agent/Program.ImeMatchingMode.cs index b8af4c94..79cfcd55 100644 --- a/src/Agent/AutopilotMonitor.Agent/Program.ImeMatchingMode.cs +++ b/src/Agent/AutopilotMonitor.Agent/Program.ImeMatchingMode.cs @@ -298,7 +298,7 @@ namespace AutopilotMonitor.Agent try { var regexStr = pattern.Pattern.Replace("{GUID}", GuidPattern); - var regex = new Regex(regexStr, RegexOptions.IgnoreCase | RegexOptions.Compiled, TimeSpan.FromSeconds(1)); + var regex = new Regex(regexStr, RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.Singleline, TimeSpan.FromSeconds(1)); compiled.Add(new MatchPattern { PatternId = pattern.PatternId, diff --git a/src/Agent/AutopilotMonitor.Agent/buildcounter.txt b/src/Agent/AutopilotMonitor.Agent/buildcounter.txt index cb93c35b..1cc5be4f 100644 --- a/src/Agent/AutopilotMonitor.Agent/buildcounter.txt +++ b/src/Agent/AutopilotMonitor.Agent/buildcounter.txt @@ -1 +1 @@ -837 +838