mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
promt
This commit is contained in:
@@ -797,13 +797,13 @@ function normalizeCommentary(rawText) {
|
||||
if (typeof rawText !== 'string') return null;
|
||||
const trimmed = rawText.trim();
|
||||
if (!trimmed) return null;
|
||||
if (trimmed.toUpperCase() === SKIP_TOKEN) return null;
|
||||
if (/\bSKIP\b/i.test(trimmed)) return null;
|
||||
const firstLine = trimmed
|
||||
.split(/\r?\n/)
|
||||
.map((line) => line.trim())
|
||||
.find(Boolean);
|
||||
if (!firstLine) return null;
|
||||
if (firstLine.toUpperCase() === SKIP_TOKEN) return null;
|
||||
if (/\bSKIP\b/i.test(firstLine)) return null;
|
||||
return firstLine.replace(/\s+/g, ' ');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user