fix: Correctly parse AUTO as automated observation indicator
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
+5
-5
@@ -743,7 +743,11 @@
|
||||
|
||||
while(index < parts.length && !preambleEnded) {
|
||||
const part = parts[index];
|
||||
if (part.length === 4 && part.match(/^[A-Z][A-Z0-9]{3}$/)) {
|
||||
if (part === 'AUTO') {
|
||||
airportTimeAutoRaw.push(part);
|
||||
airportTimeAutoDecoded.push("AUTO: Fully automated observation");
|
||||
index++;
|
||||
} else if (part.length === 4 && part.match(/^[A-Z][A-Z0-9]{3}$/)) {
|
||||
airportTimeAutoRaw.push(part);
|
||||
airportTimeAutoDecoded.push(decodeAirport(part, metarString));
|
||||
index++;
|
||||
@@ -751,10 +755,6 @@
|
||||
airportTimeAutoRaw.push(part);
|
||||
airportTimeAutoDecoded.push(decodeTime(part));
|
||||
index++;
|
||||
} else if (part === 'AUTO') {
|
||||
airportTimeAutoRaw.push(part);
|
||||
airportTimeAutoDecoded.push("AUTO: Fully automated observation");
|
||||
index++;
|
||||
} else if (part.match(/^CC[A-Z]$/)) {
|
||||
airportTimeAutoRaw.push(part);
|
||||
airportTimeAutoDecoded.push(`${part}: Correction to the report`);
|
||||
|
||||
Reference in New Issue
Block a user