aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/handlers/compile.interfaces.ts2
-rw-r--r--lib/handlers/compile.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/handlers/compile.interfaces.ts b/lib/handlers/compile.interfaces.ts
index f382da6bf..0df959fd4 100644
--- a/lib/handlers/compile.interfaces.ts
+++ b/lib/handlers/compile.interfaces.ts
@@ -33,7 +33,6 @@ export type CompileRequestQueryArgs = {
addFilters?: string;
removeFilters?: string;
skipAsm?: string;
- filterAnsi?: string;
skipPopArgs?: string;
};
@@ -66,4 +65,5 @@ export type CompileRequestTextBody = {
executeParametersArgs: any;
executeParametersStdin: any;
skipAsm: string;
+ filterAnsi?: string;
};
diff --git a/lib/handlers/compile.ts b/lib/handlers/compile.ts
index e7db12208..19594f03b 100644
--- a/lib/handlers/compile.ts
+++ b/lib/handlers/compile.ts
@@ -382,6 +382,7 @@ export class CompileHandler {
filters[item] = textRequest[item] === 'true';
});
+ backendOptions.filterAnsi = textRequest.filterAnsi === 'true';
backendOptions.skipAsm = textRequest.skipAsm === 'true';
} else {
// API-style
@@ -406,7 +407,6 @@ export class CompileHandler {
});
// Ask for asm not to be returned
backendOptions.skipAsm = query.skipAsm === 'true';
- backendOptions.filterAnsi = query.filterAnsi === 'true';
backendOptions.skipPopArgs = query.skipPopArgs === 'true';
}
const executionParameters: ExecutionParams = {
@@ -553,7 +553,7 @@ export class CompileHandler {
const text = (array || []).map(line => line.text).join('\n');
if (filterAnsi) {
// https://stackoverflow.com/questions/14693701/how-can-i-remove-the-ansi-escape-sequences-from-a-string-in-python
- return text.replaceAll(/(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]/g, '');
+ return text.replaceAll(/(\x9B|\x1B\[)[0-9:;<=>?]*[ -/]*[@-~]/g, '');
} else {
return text;
}